diff options
Diffstat (limited to 'layouts/SpecifiedLayout.py')
-rw-r--r-- | layouts/SpecifiedLayout.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/SpecifiedLayout.py b/layouts/SpecifiedLayout.py new file mode 100644 index 0000000..5a6e963 --- /dev/null +++ b/layouts/SpecifiedLayout.py @@ -0,0 +1,21 @@ +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] + |