mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
simplify effects
Former-commit-id: bbb8dc4c3852d0651eb2f4e9999e426db4a905d0
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import hyperion, time, colorsys, random, subprocess
|
||||
import hyperion, time, subprocess
|
||||
|
||||
def setPixel(x,y,rgb):
|
||||
global imageData, width
|
||||
@@ -17,8 +17,6 @@ width = 12
|
||||
height = 10
|
||||
|
||||
imageData = bytearray(height * width * (0,0,0))
|
||||
imageDataBlack = bytearray(height * width * (0,0,0))
|
||||
imageDataRed = bytearray(height * width * alarmColor)
|
||||
|
||||
# Start the write data loop
|
||||
for i in range(6):
|
||||
@@ -26,9 +24,9 @@ for i in range(6):
|
||||
off = False
|
||||
break
|
||||
if i % 2:
|
||||
hyperion.setImage(width, height, imageDataRed)
|
||||
hyperion.setColor(alarmColor[0], alarmColor[1], alarmColor[2])
|
||||
else:
|
||||
hyperion.setImage(width, height, imageDataBlack)
|
||||
hyperion.setColor(0, 0, 0)
|
||||
time.sleep(sleepTime)
|
||||
|
||||
for y in range(height,0,-1):
|
||||
|
Reference in New Issue
Block a user