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

+21
View File
@@ -0,0 +1,21 @@
# Desktop image of the controller firmware built for ESP-IDF's linux target: no hardware, no LAN.
# The web UI is embedded in the binary (main/CMakeLists.txt packs www_dist/www.pack), so no Node is needed.
# Build from the repo root: docker build -f Dockerfile.sim -t led-controller-sim .
# Run: docker run --rm -p 8080:8080 -v led-sim-data:/data led-controller-sim
FROM espressif/idf:v6.1 AS build
WORKDIR /project
COPY . .
RUN bash -c ". /opt/esp/idf/export.sh && cd sim-controller && idf.py build"
FROM debian:trixie
# The two shared libraries the binary needs, taken from the build image (no package install needed)
COPY --from=build /usr/lib/x86_64-linux-gnu/libbsd.so.0.12.1 /usr/lib/x86_64-linux-gnu/libbsd.so.0
COPY --from=build /usr/lib/x86_64-linux-gnu/libmd.so.0.1.0 /usr/lib/x86_64-linux-gnu/libmd.so.0
COPY --from=build /project/sim-controller/build/led_controller_sim.elf /usr/local/bin/led_controller_sim
ENV LED_SIM_DB=/data \
LED_SIM_HTTP_PORT=8080 \
LED_SIM_BRIDGE=127.0.0.1:8766
VOLUME ["/data"]
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/led_controller_sim"]