parent
9b6ccda602
commit
ff00a9c77d
4
main.py
4
main.py
|
@ -37,11 +37,11 @@ def debug_print(message: str):
|
||||||
|
|
||||||
def wheel(client, pos):
|
def wheel(client, pos):
|
||||||
if pos < 85:
|
if pos < 85:
|
||||||
client.publish("server-rack-led/rgb", str(pos * 3)+","+str(255 - pos * 3)+","+str(0))
|
# client.publish("server-rack-led/rgb", str(pos * 3)+","+str(255 - pos * 3)+","+str(0))
|
||||||
return Color(pos * 3, 255 - pos * 3, 0)
|
return Color(pos * 3, 255 - pos * 3, 0)
|
||||||
elif pos < 170:
|
elif pos < 170:
|
||||||
pos -= 85
|
pos -= 85
|
||||||
client.publish("server-rack-led/rgb", str(255 - pos * 3)+","+str(0)+","+str(pos * 3))
|
# client.publish("server-rack-led/rgb", str(255 - pos * 3)+","+str(0)+","+str(pos * 3))
|
||||||
return Color(255 - pos * 3, 0, pos * 3)
|
return Color(255 - pos * 3, 0, pos * 3)
|
||||||
else:
|
else:
|
||||||
pos -= 170
|
pos -= 170
|
||||||
|
|
Loading…
Reference in New Issue