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

+8 -5
View File
@@ -100,15 +100,18 @@ void web_each(const char *prefix, void (*fn)(const char *name, void *ctx), void
}
}
// Every file changes only with the firmware, so the build's hash is the ETag: browsers revalidate on
// each load (no-cache) and get a 304 until the next update, instead of running a stale UI for a day.
// Every file changes only with the web pack, so a hash of the pack is the ETag: browsers revalidate on
// each load (no-cache) and get a 304 until the UI changes, instead of running a stale UI for a day.
// (Not the app's ELF hash: the desktop and sim builds have none, so their ETag never changed.)
static const char *etag(void)
{
static char tag[20];
if (!tag[0]) {
const uint8_t *sha = esp_app_get_description()->app_elf_sha256;
snprintf(tag, sizeof(tag), "\"%02x%02x%02x%02x%02x%02x%02x%02x\"", sha[0], sha[1], sha[2], sha[3], sha[4], sha[5],
sha[6], sha[7]);
uint64_t h = 1469598103934665603ULL; // FNV-1a
for (const uint8_t *p = www_pack_start; p < www_pack_end; p++) {
h = (h ^ *p) * 1099511628211ULL;
}
snprintf(tag, sizeof(tag), "\"%016llx\"", (unsigned long long)h);
}
return tag;
}