aboutsummaryrefslogtreecommitdiff
path: root/behaviors
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-25 14:07:18 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-25 14:07:18 -0500
commit1b84f44faacfe83d4f3603b4df913ed01bf79d09 (patch)
tree5c8af28f71d44d6fb234e3c9f4b9b1f2a2be0006 /behaviors
parent2113f5363022e4ccb2b14d0a7ebd6765de820411 (diff)
parent9e1e0f0c0b6835cc3755bbaa6a364475133ce848 (diff)
Merge branch 'master' into configimprovements
Conflicts: util/Strings.py
Diffstat (limited to 'behaviors')
-rw-r--r--behaviors/AllPixelsLeft.py11
-rw-r--r--behaviors/BehaviorChain.py1
-rw-r--r--behaviors/DebugBehavior.py1
-rw-r--r--behaviors/DecayBehavior.py1
-rw-r--r--behaviors/EchoBehavior.py1
-rw-r--r--behaviors/ModifyParam.py1
-rw-r--r--behaviors/RunningBehavior.py1
7 files changed, 11 insertions, 6 deletions
diff --git a/behaviors/AllPixelsLeft.py b/behaviors/AllPixelsLeft.py
new file mode 100644
index 0000000..7f731e9
--- /dev/null
+++ b/behaviors/AllPixelsLeft.py
@@ -0,0 +1,11 @@
+from operationscore.Behavior import *
+import util.ComponentRegistry as compReg
+import pdb
+class AllPixelsLeft(Behavior):
+ def processResponse(self, sensorInputs, recursiveInputs):
+ for sensory in sensorInputs:
+ xLoc = sensory['Location'][0]
+ if type(xLoc) == type(tuple()):
+ pdb.set_trace()
+ sensory['Location'] = '[{x}<' + str(xLoc) + ']'
+ return (sensorInputs, recursiveInputs)
diff --git a/behaviors/BehaviorChain.py b/behaviors/BehaviorChain.py
index 65f5c9d..98585c9 100644
--- a/behaviors/BehaviorChain.py
+++ b/behaviors/BehaviorChain.py
@@ -1,6 +1,5 @@
from operationscore.Behavior import *
import util.ComponentRegistry as compReg
-import Util
import pdb
class BehaviorChain(Behavior):
def behaviorInit(self):
diff --git a/behaviors/DebugBehavior.py b/behaviors/DebugBehavior.py
index 4c8550a..a00346b 100644
--- a/behaviors/DebugBehavior.py
+++ b/behaviors/DebugBehavior.py
@@ -1,5 +1,4 @@
from operationscore.Behavior import *
-import Util
import pdb
class DebugBehavior(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
diff --git a/behaviors/DecayBehavior.py b/behaviors/DecayBehavior.py
index 56e1686..c1f6f92 100644
--- a/behaviors/DecayBehavior.py
+++ b/behaviors/DecayBehavior.py
@@ -1,7 +1,6 @@
from operationscore.Behavior import *
from pixelevents.DecayEvent import *
import util.Strings as Strings
-import Util
import pdb
class DecayBehavior(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
diff --git a/behaviors/EchoBehavior.py b/behaviors/EchoBehavior.py
index 002f8fb..be0ed14 100644
--- a/behaviors/EchoBehavior.py
+++ b/behaviors/EchoBehavior.py
@@ -1,6 +1,5 @@
from operationscore.Behavior import *
import util.Strings as Strings
-import Util
import pdb
class EchoBehavior(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
diff --git a/behaviors/ModifyParam.py b/behaviors/ModifyParam.py
index 38b8cd5..3701013 100644
--- a/behaviors/ModifyParam.py
+++ b/behaviors/ModifyParam.py
@@ -1,5 +1,4 @@
from operationscore.Behavior import *
-import Util
import pdb
#Class to perform a given operation on some element of an argDict. Designed to be used a recursive hook, but can serve sensor-based functions as well. Specify ParamType (Sensor or Recurse), ParamName, and ParamOp, (a valid python statement with the old value represented as {val})
class ModifyParam(Behavior):
diff --git a/behaviors/RunningBehavior.py b/behaviors/RunningBehavior.py
index 1969162..92db69b 100644
--- a/behaviors/RunningBehavior.py
+++ b/behaviors/RunningBehavior.py
@@ -2,7 +2,6 @@ from operationscore.Behavior import *
import util.ComponentRegistry as compReg
import util.Geo as Geo
import pdb
-import Util
class RunningBehavior(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
newResponses = sensorInputs