feat(audio): move beat routing server-side and extend presets

Route beat-triggered manual selects from the controller server, add preset background and beat-counter UI support, and bump led-driver to include the matching pattern/runtime fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-09 20:08:05 +12:00
parent 1db905eaae
commit 822d9d8e01
21 changed files with 2453 additions and 109 deletions

View File

@@ -368,6 +368,7 @@ async def create_driver_pattern(request):
name, code (required),
min_delay, max_delay, max_colors (optional numbers),
has_background (optional bool),
supports_manual (optional bool, default true if omitted in db),
n1..n8 (optional string labels),
overwrite (optional, default true).
"""
@@ -413,6 +414,9 @@ async def create_driver_pattern(request):
if "has_background" in data:
meta["has_background"] = bool(data.get("has_background"))
if "supports_manual" in data:
meta["supports_manual"] = bool(data.get("supports_manual"))
for i in range(1, 9):
nk = "n%d" % i
if nk not in data:

View File

@@ -315,6 +315,13 @@ async def push_driver_messages(request, session):
except Exception:
return json.dumps({"error": "Send failed"}), 503, {'Content-Type': 'application/json'}
try:
from util.beat_driver_route import sync_beat_route_from_push_sequence
sync_beat_route_from_push_sequence(seq)
except Exception:
pass
return json.dumps({
"message": "Delivered",
"deliveries": deliveries,