From 2736307c1d6d67868ca54a3df951f9e959efedd0 Mon Sep 17 00:00:00 2001 From: rcoh Date: Mon, 20 Dec 2010 14:50:08 -0500 Subject: Util cleanup is done! Util.py is now refactored into the util module. Woo! RCOH --- pixelcore/PixelStrip.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pixelcore/PixelStrip.py') 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. -- cgit v1.2.3