From a7697c9d636b5adab9bdf95d42ff77c3a060c63d Mon Sep 17 00:00:00 2001 From: rcoh Date: Sun, 13 Feb 2011 02:47:07 -0500 Subject: Added ability to specify a precise pixelmap. untested. --- layouts/SpecifiedLayout.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 layouts/SpecifiedLayout.py (limited to 'layouts') 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 tag in the args dict as follows': + + + (1,1) + (50,50) + + etc. + + 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] -- cgit v1.2.3