diff options
author | rcoh <rcoh@mit.edu> | 2011-01-04 17:23:30 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-01-04 17:23:30 -0500 |
commit | 1679719e7ca8ce433c5714474a32c926161dc5b8 (patch) | |
tree | dc75dc66ee8695fe786df2b48c0e6911332ed7c5 /LightInstallation.py | |
parent | 395e99394ead5d0d656e74fed23dc780652b6090 (diff) |
Some performance improvements -- we also synchronize all the frames, giving us a meaning that even
if things slow down, rendering doesn't look weird.
Diffstat (limited to 'LightInstallation.py')
-rw-r--r-- | LightInstallation.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/LightInstallation.py b/LightInstallation.py index db7b808..6e3c093 100644 --- a/LightInstallation.py +++ b/LightInstallation.py @@ -99,9 +99,9 @@ class LightInstallation: exec('from ' + module+'.'+className + ' import *') main_log.debug(module +'.' +className + 'imported') except Exception as inst: - pdb.set_trace() main_log.error('Error importing ' + module+'.'+'.className. Component not\ initialized.') + main_log.error(str(inst)) #TODO: exception logging continue #TODO: verify functions as expected args = configGetter.pullArgsFromItem(configItem) args['parentScope'] = self #TODO: we shouldn't give away scope @@ -112,7 +112,7 @@ class LightInstallation: #right except Exception as inst: main_log.error('Failure while initializing ' + className + ' with ' + str(args)) - #main_log.error(inst) TODO: exception logging + main_log.error(str(inst)) #TODO: exception logging return components def alive(self): @@ -121,7 +121,7 @@ class LightInstallation: #self.screen.allOn() lastLoopTime = clock.time() refreshInterval = 30 - runCount = 3000 + runCount = 2000 while runCount > 0: runCount -= 1 loopStart = clock.time() @@ -131,7 +131,7 @@ class LightInstallation: [self.screen.respond(response) for response in responses if response != []] self.screen.timeStep() - [r.render(self.screen) for r in self.renderers] + [r.render(self.screen, loopStart) for r in self.renderers] loopElapsed = clock.time()-loopStart sleepTime = max(0,refreshInterval-loopElapsed) self.timer.stop() |