diff options
author | rcoh <rcoh@mit.edu> | 2010-12-20 14:50:08 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2010-12-20 14:50:08 -0500 |
commit | 2736307c1d6d67868ca54a3df951f9e959efedd0 (patch) | |
tree | 50a61c798d52987f8fe575f678aaff5b5b9455b9 /operationscore/PixelEvent.py | |
parent | 7386cbc7ce48e3996d92d84cff3d1a4dab8f538d (diff) |
Util cleanup is done! Util.py is now refactored into the util module. Woo! RCOH
Diffstat (limited to 'operationscore/PixelEvent.py')
-rw-r--r-- | operationscore/PixelEvent.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/operationscore/PixelEvent.py b/operationscore/PixelEvent.py index 27e6e4a..e2b852a 100644 --- a/operationscore/PixelEvent.py +++ b/operationscore/PixelEvent.py @@ -16,4 +16,12 @@ class PixelEvent(SmootCoreObject): return self.__class__(newDict) def state(self,timeDelay): pass + @staticmethod + def addPixelEventIfMissing(responseDict): + if not 'PixelEvent' in responseDict: + if 'Color' in responseDict: + color = responseDict['Color'] + else: + raise Exception('Need Color. Probably') + responseDict['PixelEvent'] = StepEvent.generate(300, color) |