From 7f88db7003a03b50dc500bf7bd711407f1a640de Mon Sep 17 00:00:00 2001 From: rcoh Date: Sat, 22 Jan 2011 13:31:56 -0500 Subject: Bouncing behavior. Working out a weird bug. Threading may be involved? --- operationscore/Input.py | 1 - operationscore/PixelAssembler.py | 2 ++ operationscore/PixelMapper.py | 4 +++- operationscore/Renderer.py | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'operationscore') diff --git a/operationscore/Input.py b/operationscore/Input.py index 2ee3c3c..69375d3 100644 --- a/operationscore/Input.py +++ b/operationscore/Input.py @@ -14,7 +14,6 @@ class Input(ThreadedSmootCoreObject): def init(self): self.eventQueue = [] if not 'RefreshInterval' in self.argDict: - print 'RefreshInterval not defined. Defaulting to .5s.' self.argDict['RefreshInterval'] = 500 self.parentScope = self.argDict['parentScope'] self.inputInit() diff --git a/operationscore/PixelAssembler.py b/operationscore/PixelAssembler.py index 6878f8a..84f3b0b 100644 --- a/operationscore/PixelAssembler.py +++ b/operationscore/PixelAssembler.py @@ -23,6 +23,8 @@ class PixelAssembler(SmootCoreObject): between adjacent pixels must be less than \ pixelToPixelSpacing.') locations.append(newLocation) + if self['Reverse']: + locations.reverse() return locations def initLayout(self): pass diff --git a/operationscore/PixelMapper.py b/operationscore/PixelMapper.py index 1f94fa5..7e2b0af 100644 --- a/operationscore/PixelMapper.py +++ b/operationscore/PixelMapper.py @@ -1,4 +1,5 @@ from operationscore.SmootCoreObject import * +from logger import main_log import pdb class PixelMapper(SmootCoreObject): def init(self): @@ -8,7 +9,8 @@ class PixelMapper(SmootCoreObject): def mapEvent(self, eventLocation, screen): self.totalCalls += 1 if self.totalCalls % 100 == 0: - print self['Id'], self.cachehits / float(self.totalCalls) + main_log.info('Cache percentage for :', self['Id'], self.cachehits /\ + float(self.totalCalls)) if eventLocation in self.mem: self.cachehits += 1 return self.mem[eventLocation] diff --git a/operationscore/Renderer.py b/operationscore/Renderer.py index ed88a8c..b422304 100644 --- a/operationscore/Renderer.py +++ b/operationscore/Renderer.py @@ -3,8 +3,8 @@ #Inheriting classes may define initRenderer which is called after the dictionary #is pulled from config. #TODO: multithreaded-rendering -from operationscore.ThreadedSmootCoreObject import * -class Renderer(ThreadedSmootCoreObject): +from operationscore.SmootCoreObject import * +class Renderer(SmootCoreObject): def init(self): self.initRenderer() def render(lightSystem): -- cgit v1.2.3