diff options
author | rcoh <rcoh@mit.edu> | 2011-02-14 01:51:43 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-02-14 01:51:43 -0500 |
commit | 83242972c09032eb89dd547f3ff3c4dcc2693555 (patch) | |
tree | 62fdb611afbb37ff90f0356cac5828f48ec50f60 /LightInstallation.py | |
parent | 9c76b22071259fe8195eaf5bd846219fc2cade4d (diff) |
Fixed some threading bugs. Modified LightInstallation.py so that Behaviors are *Only* run if they
are marked to be rendered. Fixed a threading issue tied to the component registry.
Diffstat (limited to 'LightInstallation.py')
-rwxr-xr-x | LightInstallation.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/LightInstallation.py b/LightInstallation.py index cca1588..91be752 100755 --- a/LightInstallation.py +++ b/LightInstallation.py @@ -103,9 +103,6 @@ class LightInstallation(object): for component in components: cid = compReg.registerComponent(component) main_log.info(cid + ' registered') - compReg.registerComponent(component) - main_log.info(cid + ' registered') - def initializeComponent(self, config): components = [] if config != None: @@ -164,8 +161,8 @@ class LightInstallation(object): responses = {} responses['Screen'] = [] #responses to the screen for behavior in self.behaviors: - responses[behavior['Id']] = behavior.timeStep() if behavior['RenderToScreen'] == True: + responses[behavior['Id']] = behavior.timeStep() responses['Screen'] += responses[behavior['Id']] return responses['Screen'] @@ -184,6 +181,7 @@ class LightInstallation(object): def processResponse(self,inputDict, responseDict): inputId = inputDict['Id'] + #coming from. boundBehaviorIds = self.inputBehaviorRegistry[inputId] try: [compReg.getComponent(b).addInput(responseDict) for b in boundBehaviorIds] |