diff options
author | rcoh <rcoh@mit.edu> | 2011-01-27 16:50:59 -0500 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-01-27 16:50:59 -0500 |
commit | 5fb3ea060025241105dc8e9a174513c112f9a133 (patch) | |
tree | e98b1b3eab0b05b0e518b08cbab086d224fd9250 /layouts | |
parent | 5d29906fff79bc6e4ba83be7028e1380a0014d21 (diff) |
A metric $#%$-ton of changes. Added doc-strings to EVERYTHING. Phew. Fixed a massive bug that
increases performance in by up to a factor of 60. A bunch of new behaviors for the class.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/LineLayout.py | 2 | ||||
-rw-r--r-- | layouts/ZigzagLayout.py | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/layouts/LineLayout.py b/layouts/LineLayout.py index 34f5e36..1d40105 100644 --- a/layouts/LineLayout.py +++ b/layouts/LineLayout.py @@ -1,5 +1,5 @@ from operationscore.PixelAssembler import * -#Simple layout class that simply makes a line of LEDs class LineLayout(PixelAssembler): + """LineLayout is a layout class that makes a line of LEDs""" def layoutFunc(self, lastLocation): return (lastLocation[0]+self.argDict['spacing'], lastLocation[1]) diff --git a/layouts/ZigzagLayout.py b/layouts/ZigzagLayout.py index 221571c..3fc2ea1 100644 --- a/layouts/ZigzagLayout.py +++ b/layouts/ZigzagLayout.py @@ -10,6 +10,15 @@ import pdb # | # X-X-X-X etc. class ZigzagLayout(PixelAssembler): + """ZigZagLayout is a slightly more complex layout class that makes a zig-Zag Led Pattern + Inheriting classes must specify zigLength, the length in lights of a of a zig + and zig Axis, the direction of the long X axis (X or Y). + EG: zig length = 4, zig Axis = X would give: + X-X-X-X + | + X-X-X-X + | + X-X-X-X etc. def initLayout(self): if not 'zigLength' in self.argDict: raise Exception('zigLength must be defined in argDict') |