undo last commit

This commit is contained in:
Maximilian Giller 2023-10-11 01:46:13 +02:00
parent 6bf7f7525e
commit f64d842126

View file

@ -36,7 +36,7 @@ async def start_time_loop():
async def turn_off():
global should_run_time_loop
should_run_time_loop = False
asyncio.create_task(lambda: matrix_display.turn_off())
matrix_display.turn_off()
return {"message": "Display turned off"}
@ -44,7 +44,7 @@ async def turn_off():
async def flash(count: int = 1):
global should_run_time_loop
should_run_time_loop = False
asyncio.create_task(lambda: matrix_display.flash(count))
matrix_display.flash(count)
return {"message": "Display flashed"}
@ -54,7 +54,7 @@ async def display_message(body: dict):
should_run_time_loop = False
message_text = body.get("message")
try:
asyncio.create_task(lambda: matrix_display.show_text(message_text))
matrix_display.show_text(message_text)
except requests.exceptions.RequestException as e:
raise HTTPException(
status_code=500,