many works
This commit is contained in:
parent
9bd764579a
commit
c937450f92
7 changed files with 151 additions and 36 deletions
6
main.py
6
main.py
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue