aboutsummaryrefslogtreecommitdiff
path: root/inputs/ContinuousCenterInput.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-14 01:51:43 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-14 01:51:43 -0500
commit83242972c09032eb89dd547f3ff3c4dcc2693555 (patch)
tree62fdb611afbb37ff90f0356cac5828f48ec50f60 /inputs/ContinuousCenterInput.py
parent9c76b22071259fe8195eaf5bd846219fc2cade4d (diff)
Fixed some threading bugs. Modified LightInstallation.py so that Behaviors are *Only* run if they
are marked to be rendered. Fixed a threading issue tied to the component registry.
Diffstat (limited to 'inputs/ContinuousCenterInput.py')
-rw-r--r--inputs/ContinuousCenterInput.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/inputs/ContinuousCenterInput.py b/inputs/ContinuousCenterInput.py
index a7635b2..88534f0 100644
--- a/inputs/ContinuousCenterInput.py
+++ b/inputs/ContinuousCenterInput.py
@@ -4,9 +4,10 @@ import util.Strings as Strings
from operationscore.Input import *
class ContinuousCenterInput(Input):
def inputInit(self):
+ compReg.getLock().acquire()
minX,minY,maxX,maxY = compReg.getComponent('Screen').getSize()
+ compReg.getLock().release()
self.center = ((minX+maxX) / 2, (minY+maxY) / 2)
- print self.center
def sensingLoop(self):
self.respond({Strings.LOCATION: self.center})