diff options
Diffstat (limited to 'behaviors')
-rw-r--r-- | behaviors/AllPixelsLeft.py | 2 | ||||
-rw-r--r-- | behaviors/BehaviorChain.py | 6 | ||||
-rw-r--r-- | behaviors/DebugBehavior.py | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/behaviors/AllPixelsLeft.py b/behaviors/AllPixelsLeft.py index e1f4080..b48bfc1 100644 --- a/behaviors/AllPixelsLeft.py +++ b/behaviors/AllPixelsLeft.py @@ -5,5 +5,5 @@ class AllPixelsLeft(Behavior): def processResponse(self, sensorInputs, recursiveInputs): for sensory in sensorInputs: xLoc = sensory['Location'][0] - sensory['Location'] = '[{x}<' + str(xLoc) + ']' + sensory['Location'] = '{x}<' + str(xLoc) return (sensorInputs, recursiveInputs) diff --git a/behaviors/BehaviorChain.py b/behaviors/BehaviorChain.py index ce161f9..0170fa8 100644 --- a/behaviors/BehaviorChain.py +++ b/behaviors/BehaviorChain.py @@ -1,6 +1,6 @@ from operationscore.Behavior import * import util.ComponentRegistry as compReg -import logging as main_log +from logger import main_log import pdb class BehaviorChain(Behavior): def behaviorInit(self): @@ -8,6 +8,7 @@ class BehaviorChain(Behavior): self.hooks = self['RecursiveHooks'] if self.hooks == None: self.hooks = {} + def processResponse(self, sensorInputs, recursiveInputs): response = sensorInputs for behaviorId in self['ChainedBehaviors']: @@ -27,6 +28,7 @@ class BehaviorChain(Behavior): []) if hookRecurrence != []: main_log.warn('Hook recurrences are not currently supported. Implement it\ - yourself or bug russell') +yourself or bug russell') self.feedback[behaviorId] = recurrence return response + diff --git a/behaviors/DebugBehavior.py b/behaviors/DebugBehavior.py index 8e9bbdb..eb525e7 100644 --- a/behaviors/DebugBehavior.py +++ b/behaviors/DebugBehavior.py @@ -4,5 +4,5 @@ import pdb class DebugBehavior(Behavior): def processResponse(self, sensorInputs, recursiveInputs): if sensorInputs != []: - main_log.debug('Sensor Inputs: ', str(sensorInputs)) + main_log.debug('Sensor Inputs: '+ str(sensorInputs)) return [] |