aboutsummaryrefslogtreecommitdiff
path: root/operationscore
diff options
context:
space:
mode:
Diffstat (limited to 'operationscore')
-rw-r--r--operationscore/Behavior.py2
-rw-r--r--operationscore/Input.py1
-rw-r--r--operationscore/PixelAssembler.py2
-rw-r--r--operationscore/PixelMapper.py4
-rw-r--r--operationscore/Renderer.py4
5 files changed, 9 insertions, 4 deletions
diff --git a/operationscore/Behavior.py b/operationscore/Behavior.py
index 882a290..b3f7342 100644
--- a/operationscore/Behavior.py
+++ b/operationscore/Behavior.py
@@ -9,6 +9,7 @@
import pdb
from operationscore.SmootCoreObject import *
+from logger import main_log
#timeStep is called on every iteration of the LightInstallation
#addInput is called on each individual input received, and the inputs queue
class Behavior(SmootCoreObject):
@@ -56,4 +57,5 @@ class Behavior(SmootCoreObject):
self.recursiveResponseQueue)
self.sensorResponseQueue = []
self.recursiveResponseQueue = recursions
+ main_log.debug(self['Id'] + ' Ouputs ' + str(outputs))
return self.addMapperToResponse(outputs)
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):