feat: browser simulator served by the controller, desktop build, browser bridge

- led-simulator: the rig runs the C++ led-driver as WebAssembly (sim-driver/),
  one single-threaded worker per bar, no cross-origin isolation needed. Rooms
  (one JSON per room) with an on-page editor, and a pattern gallery. The
  Python server, Pyodide boot and ring buffer are removed.
- sim-controller sim_rig.c: serves /sim/ from an embedded pack, the page's
  WebSocket and the rooms/flash API. The desktop build embeds it too.
- bridge.c: a "browser" bridge kind that carries ESP-NOW frames to the page;
  devices announced through it are marked sim.
- UI: Simulator in the Menu, split view with resize and pop-out, swipe
  between controller and rig on phones; SIM/REAL badges in Devices.
- Fades: preset pushes and Wi-Fi driver bodies always carry fade and
  beat_time, so "off" no longer inherits an earlier fade.
- Also the sequences-v2 work in progress: desktop port, bridge firmware,
  serial bridge, Wi-Fi drivers, sequence timeline, audio and API changes.
- led-driver: ESP-NOW link, beat sync, control messages, sim hooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-16 19:32:46 +13:00
1 parent 698c1463c0
commit 581b751904
506 files changed
+42336 -3599

No files matched your search

+6
View File
@@ -24,6 +24,8 @@ cJSON *engine_preset_payload(const char *preset_id);
int engine_group_macs(const char *gid, char out[][13], int max);
// The preset a zone last played (engine_play / engine_stop), or NULL. Call with the store locked.
const char *engine_zone_current(const char *zone_id);
// Record preset_id as what zone_id plays, when the UI has sent it to the drivers itself
void engine_zone_note(const char *zone_id, const char *preset_id);
// Select a preset on every driver in the zone's groups (broadcast, sent twice)
esp_err_t engine_play(const char *zone_id, const char *preset_id);
@@ -35,6 +37,10 @@ esp_err_t engine_push(const cJSON *messages, const cJSON *targets);
// POST /presets/send: presets from the current profile by id
esp_err_t engine_send_presets(const cJSON *ids, bool save, const char *def, const cJSON *targets, int *sent);
// A Wi-Fi driver reported its MAC (hex, no separators): record it, and merge an ESP-NOW record for the same
// board into the Wi-Fi device. Call without the store lock held.
void engine_wifi_mac(const char *host, const char *mac);
// Zones or devices changed: re-send group membership to every registered ESP-NOW driver
void engine_groups_changed(void);
// POST /devices/groups: send every ESP-NOW driver its groups, including silent ones, and wait for the