many works

This commit is contained in:
Christoph Haas 2026-01-11 16:20:31 +01:00
parent 9bd764579a
commit c937450f92
7 changed files with 151 additions and 36 deletions

View file

@ -6,6 +6,8 @@ from time import sleep
import importlib
import os
from PIL import Image
#from lib.display import show
import lib.display
SCENES_DIR = 'scenes'
scenes = {}
@ -48,7 +50,8 @@ def start_animation(scene_name):
# Reset stop event and start new thread
stop_event.clear()
animation_thread = Thread(target=scenes[scene_name].start, args=(image_buffer, stop_event), daemon=True)
#animation_thread = Thread(target=scenes[scene_name].start, args=(image_buffer, stop_event), daemon=True)
animation_thread = Thread(target=scenes[scene_name].start, args=(stop_event,), daemon=True)
animation_thread.start()
@app.route("/start/<animation_name>")
@ -66,3 +69,4 @@ def stop():
if __name__ == "__main__":
app.run(debug=True, port=6000)