aboutsummaryrefslogtreecommitdiff
path: root/pixelevents/SynchTestEvent.py
diff options
context:
space:
mode:
authorGravatar dan <dmtaub@gmail.com>2011-01-28 16:31:58 -0500
committerGravatar dan <dmtaub@gmail.com>2011-01-28 16:31:58 -0500
commitb11a72afece56dc138aac5400057668e8388f43d (patch)
treeb779455122ee1987d3fcd9b51fcffa8d03057b86 /pixelevents/SynchTestEvent.py
parent6a0bfdfb00944ae0bcc6215a194c3290b4a085f2 (diff)
parentb67a37ad06fa4c97dcdb32cecc71c7f492b12840 (diff)
Merge branch 'fridaydemo' of github.com:rcoh/SmootLight into osc
Conflicts: behaviors/ControllerOSC.py
Diffstat (limited to 'pixelevents/SynchTestEvent.py')
-rw-r--r--pixelevents/SynchTestEvent.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pixelevents/SynchTestEvent.py b/pixelevents/SynchTestEvent.py
new file mode 100644
index 0000000..3e7ed0c
--- /dev/null
+++ b/pixelevents/SynchTestEvent.py
@@ -0,0 +1,15 @@
+from operationscore.PixelEvent import *
+class SynchTestEvent(PixelEvent):
+ """SynchTestEvent is an event to test the synchronization of the power supplies"""
+ def initEvent(self):
+ self.eventstate = 0
+ self.cachedDelay = 0
+ def state(self, timeDelay):
+ if timeDelay != self.cachedDelay:
+ self.eventstate += 1
+ self.cachedDelay = timeDelay
+ color = [0]*3
+ color[self.eventstate % 3] = 150
+ if self.eventstate > 500:
+ self.eventstate = 0
+ return color