diff options
Diffstat (limited to 'operationscore')
-rw-r--r-- | operationscore/PixelAssembler.py | 3 | ||||
-rw-r--r-- | operationscore/PixelEvent.py | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/operationscore/PixelAssembler.py b/operationscore/PixelAssembler.py index b6e35ac..c8563fb 100644 --- a/operationscore/PixelAssembler.py +++ b/operationscore/PixelAssembler.py @@ -1,4 +1,5 @@ from operationscore.SmootCoreObject import * +import util.Geo as Geo import Util import pdb class PixelAssembler(SmootCoreObject): @@ -17,7 +18,7 @@ class PixelAssembler(SmootCoreObject): if newLocation == None: raise Exception('Location cannot be null. layoutFunc not \ defined or improperly defined.') - if Util.dist(newLocation, locations[-1]) > \ + if Geo.dist(newLocation, locations[-1]) > \ self['pixelToPixelSpacing']: raise Exception('Illegal pixel location. Distance \ between adjacent pixels must be less than \ 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) |