added 3 new animations, simple css change

This commit is contained in:
yuri 2022-08-06 19:42:40 +02:00
commit feced317af
No known key found for this signature in database
GPG key ID: E646779AC54AEC64
4 changed files with 196 additions and 5 deletions

8
dmx.py
View file

@ -5,7 +5,7 @@ from threading import Thread
from time import sleep
from typing import Union
from animation import Animation, Off, Steady, FadeTo, RotatingRainbow, Chase
from animation import Animation, Off, RandomSingle, Steady, FadeTo, RotatingRainbow, Chase, TwoColor, Caramelldansen
def ledlog(value):
@ -125,6 +125,12 @@ class DMX:
animation = RotatingRainbow()
elif animation == "steady":
animation = Steady(self._color)
elif animation == "twocolor":
animation = TwoColor(self._color)
elif animation == "caramelldansen":
animation = Caramelldansen(self._color)
elif animation == "randomsingle":
animation = RandomSingle(self._color)
else:
raise ValueError(f"No such animation {animation}")
self._animation = animation