aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-13 02:47:07 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-13 02:47:07 -0500
commita7697c9d636b5adab9bdf95d42ff77c3a060c63d (patch)
tree8d4c11b5c4a988128d0d2436913a49c6af13fc5f
parent5b18ae78733cb4ffbc0ca9fd8f13f5ae1f7e37a6 (diff)
Added ability to specify a precise pixelmap. untested.
-rw-r--r--layouts/SpecifiedLayout.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/layouts/SpecifiedLayout.py b/layouts/SpecifiedLayout.py
new file mode 100644
index 0000000..967a3d6
--- /dev/null
+++ b/layouts/SpecifiedLayout.py
@@ -0,0 +1,20 @@
+from operationscore.PixelAssembler import *
+class SpecifiedLayout(PixelAssembler):
+ """SpecifiedLayout is a class that allows precise specification of each individual LED.
+ Configure with a <Locations> tag in the args dict as follows':
+ <Args>
+ <Locations>
+ <Loc>(1,1)</Loc>
+ <Loc>(50,50)</Loc>
+ </Locations>
+ etc.
+ </Args>
+ You may put attributes on the Locs so that you don't get confused.
+ """
+
+ def layoutInit(self):
+ self.lightNum = -1
+
+ def layoutFunc(self, lastLocation):
+ self.lightNum += 1
+ return self['Locations'][self.lightNum]