blob: b746e683f1f64814183033a882784c059831312e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 initLayout(self):
self.lightNum = -1
def layoutFunc(self, lastLocation):
self.lightNum += 1
return self['Locations'][self.lightNum]
|