aboutsummaryrefslogtreecommitdiff
path: root/pixelevents
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-01-28 16:29:36 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-01-28 16:29:36 -0500
commitb67a37ad06fa4c97dcdb32cecc71c7f492b12840 (patch)
treed739c2968d5cce044f204393838fb79e710604f2 /pixelevents
parent23b8176c9e7fcbcc7fbe45b9840012a91e2f39e0 (diff)
Picking up some files that were lost.
Diffstat (limited to 'pixelevents')
-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