diff options
author | rcoh <rcoh@mit.edu> | 2011-01-22 13:31:56 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-01-22 13:31:56 -0500 |
commit | 7f88db7003a03b50dc500bf7bd711407f1a640de (patch) | |
tree | 64c08cf2bfd6fb30ccbfc3f4a9fb2435f417abdf /behaviors | |
parent | a223608dda0751551c6e8688c0c0e1c9a1d4e69c (diff) |
Bouncing behavior. Working out a weird bug. Threading may be involved?
Diffstat (limited to 'behaviors')
-rw-r--r-- | behaviors/RestrictLocation.py | 2 | ||||
-rw-r--r-- | behaviors/Square.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/behaviors/RestrictLocation.py b/behaviors/RestrictLocation.py index febc9ed..f6c26ff 100644 --- a/behaviors/RestrictLocation.py +++ b/behaviors/RestrictLocation.py @@ -25,7 +25,7 @@ class RestrictLocation(Behavior): def processResponse(self, sensorInputs, recursiveInputs): ret = [] for data in sensorInputs: - if not self.locEval(data['Location']): + if self.locEval(data['Location']): (dataOut, recur) = self.paramModifier.immediateProcessInput([data], []) #behaviors expect lists ^[] ret += dataOut diff --git a/behaviors/Square.py b/behaviors/Square.py index a6e9401..aef3622 100644 --- a/behaviors/Square.py +++ b/behaviors/Square.py @@ -5,6 +5,7 @@ class Square(Behavior): xLoc = sensory['Location'][0] yLoc = sensory['Location'][1] width = self['Width'] + #sensory['Location'] = 'True' sensory['Location'] =\ '{x}<'+str(xLoc+width)+',{x}>'+str(xLoc-width)+\ ',{y}<'+str(yLoc+width)+',{y}>'+str(yLoc-width) |