aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-12 15:59:59 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-12 15:59:59 -0500
commit4d62e1152241854ab864142d827d735d84405078 (patch)
tree2589c6a37721e1b8362c8e8c6a580c8c185b2f86 /layouts
parentb45b9079c5decd720d8275378bb0d6dc172c6234 (diff)
Modified the test code to automatically pick up new tests. Just add your test file to
tests/__init__.py. Fixed a bug in ZigZagLayout. Added the BehaviorQuerySystem to allow querying on behaviors. Added the "ModulateColor" behavior which will continually shift a color along the HSV plane. Added TestBQS to test the behavior query system. Modified Behavior to have a getLastOutput and setLastOutput method.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/C5SignLayout.xml16
-rw-r--r--layouts/ZigzagLayout.py11
2 files changed, 17 insertions, 10 deletions
diff --git a/layouts/C5SignLayout.xml b/layouts/C5SignLayout.xml
new file mode 100644
index 0000000..58310d7
--- /dev/null
+++ b/layouts/C5SignLayout.xml
@@ -0,0 +1,16 @@
+ <PixelConfiguration>
+ <PixelStrip>
+ <Class>layouts.ZigzagLayout</Class>
+ <Args>
+ <Id>strip1</Id>
+ <zigLength>10</zigLength>
+ <zigAxis>X</zigAxis>
+ <yDirection>1</yDirection>
+ <pixelToPixelSpacing>20</pixelToPixelSpacing>
+ <spacing>20</spacing> <!--we can space at any value less the
+ l2lspacing-->
+ <numPixels>50</numPixels>
+ <originLocation>(0,0)</originLocation>
+ </Args>
+ </PixelStrip>
+ </PixelConfiguration>
diff --git a/layouts/ZigzagLayout.py b/layouts/ZigzagLayout.py
index 3fc2ea1..665d14e 100644
--- a/layouts/ZigzagLayout.py
+++ b/layouts/ZigzagLayout.py
@@ -1,14 +1,5 @@
from operationscore.PixelAssembler import *
import pdb
-#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.
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
@@ -18,7 +9,7 @@ class ZigzagLayout(PixelAssembler):
|
X-X-X-X
|
- X-X-X-X etc.
+ X-X-X-X etc."""
def initLayout(self):
if not 'zigLength' in self.argDict:
raise Exception('zigLength must be defined in argDict')