blob: 3e7ed0ce26d418483e1bfea8860997750e497945 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
|