aboutsummaryrefslogtreecommitdiff
path: root/behaviors/BehaviorChain.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-20 15:42:13 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-20 15:42:13 -0500
commita1d9b85320c9b07d62470d78ef0c5f9015baf813 (patch)
tree8df16aec8de793ba0f2e4b330b764a6f6a49f59a /behaviors/BehaviorChain.py
parent17577b1b19387b2cefb7ac777ed1323dd36be086 (diff)
parent2736307c1d6d67868ca54a3df951f9e959efedd0 (diff)
Merge branch 'master' into pixelregions
Conflicts: Util.py pixelmappers/SimpleMapper.py
Diffstat (limited to 'behaviors/BehaviorChain.py')
-rw-r--r--behaviors/BehaviorChain.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/behaviors/BehaviorChain.py b/behaviors/BehaviorChain.py
index fe50573..65f5c9d 100644
--- a/behaviors/BehaviorChain.py
+++ b/behaviors/BehaviorChain.py
@@ -1,4 +1,5 @@
from operationscore.Behavior import *
+import util.ComponentRegistry as compReg
import Util
import pdb
class BehaviorChain(Behavior):
@@ -10,7 +11,7 @@ class BehaviorChain(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
response = sensorInputs
for behaviorId in self['ChainedBehaviors']:
- behavior = Util.getComponentById(behaviorId)
+ behavior = compReg.getComponent(behaviorId)
if behaviorId in self.feedback:
recurrence = self.feedback[behaviorId]
else:
@@ -19,7 +20,7 @@ class BehaviorChain(Behavior):
recurrence)
if behaviorId in self.hooks: #process recursive hook if there is one
- hookBehavior = Util.getComponentById(self.hooks[behaviorId])
+ hookBehavior = compReg.getComponent(self.hooks[behaviorId])
#we feed its recurrence in as input to the behavior.
(recurrence, hookRecurrence) = \
hookBehavior.immediateProcessInput(recurrence, \