aboutsummaryrefslogtreecommitdiff
path: root/pixelcore/PixelStrip.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-20 15:42:13 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-20 15:42:13 -0500
commita1d9b85320c9b07d62470d78ef0c5f9015baf813 (patch)
tree8df16aec8de793ba0f2e4b330b764a6f6a49f59a /pixelcore/PixelStrip.py
parent17577b1b19387b2cefb7ac777ed1323dd36be086 (diff)
parent2736307c1d6d67868ca54a3df951f9e959efedd0 (diff)
Merge branch 'master' into pixelregions
Conflicts: Util.py pixelmappers/SimpleMapper.py
Diffstat (limited to 'pixelcore/PixelStrip.py')
-rw-r--r--pixelcore/PixelStrip.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pixelcore/PixelStrip.py b/pixelcore/PixelStrip.py
index c82a87a..cfab948 100644
--- a/pixelcore/PixelStrip.py
+++ b/pixelcore/PixelStrip.py
@@ -1,4 +1,6 @@
from pixelcore.Pixel import *
+import util.Strings as Strings
+import util.Geo as Geo
from pixelevents.StepEvent import *
import pygame
import math
@@ -21,7 +23,7 @@ class PixelStrip:
[l.turnOnFor(time) for l in self.pixels] #TODO: add test-on method to
#pixels
def respond(self, responseInfo):
- location = responseInfo[Util.location]
+ location = responseInfo[Strings.LOCATION]
if not 'PixelEvent' in responseInfo:
if 'Color' in responseInfo:
color = responseInfo['Color']
@@ -32,7 +34,7 @@ class PixelStrip:
pixel.processInput(responseInfo['PixelEvent'], 0) #TODO: z-index
def getPixelNearest(self, location):
- dists = [(Util.dist(location, pixel.location), pixel) for pixel in self.pixels]
+ dists = [(Geo.dist(location, pixel.location), pixel) for pixel in self.pixels]
dists.sort()
return dists[0]
#just for now.