Small fixes
This commit is contained in:
parent
22353f34ab
commit
592d87019a
1 changed files with 16 additions and 0 deletions
16
src/main.py
16
src/main.py
|
@ -32,6 +32,22 @@ async def start_time_loop():
|
|||
return {"message": "Time loop started"}
|
||||
|
||||
|
||||
@app.post("/off")
|
||||
async def turn_off():
|
||||
global should_run_time_loop
|
||||
should_run_time_loop = False
|
||||
matrix_display.turn_off()
|
||||
return {"message": "Display turned off"}
|
||||
|
||||
|
||||
@app.post("/flash")
|
||||
async def flash(count: int = 1):
|
||||
global should_run_time_loop
|
||||
should_run_time_loop = False
|
||||
matrix_display.flash(count)
|
||||
return {"message": "Display flashed"}
|
||||
|
||||
|
||||
@app.post("/message")
|
||||
async def display_message(body: dict):
|
||||
global should_run_time_loop
|
||||
|
|
Loading…
Reference in a new issue