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 -3
View File
@@ -11,6 +11,8 @@
#include <stdlib.h>
#include "esp_netif.h"
#include "esp_eth.h"
#include "esp_eth_mac_w5500.h"
#include "esp_eth_phy_w5500.h"
#include "esp_mac.h"
#include "nvs_flash.h"
#include "driver/gpio.h"
@@ -20,6 +22,7 @@
#include "esp_heap_caps.h"
#include "esp_system.h"
#include "mdns.h"
#include "wifi_drv.h"
#include "lwip/ip4_addr.h"
#include "lwip/etharp.h"
#include "lwip/netif.h"
@@ -285,6 +288,7 @@ static void start_mdns(void)
mdns_instance_name_set("LED controller");
mdns_service_add(NULL, "_http", "_tcp", 80, NULL, 0);
ESP_LOGI(TAG, "mDNS: %s.local", host);
wifi_drv_start_discovery();
}
static void start_webserver(void)
@@ -396,9 +400,9 @@ static esp_err_t w5500_init(esp_eth_handle_t *eth_handle_out)
};
eth_w5500_config_t w5500_config = ETH_W5500_DEFAULT_CONFIG(CONFIG_W5500_SPI_HOST, &spi_devcfg);
w5500_config.int_gpio_num = CONFIG_W5500_INT_GPIO;
w5500_config.base.int_gpio_num = CONFIG_W5500_INT_GPIO;
if (CONFIG_W5500_INT_GPIO < 0) {
w5500_config.poll_period_ms = CONFIG_W5500_POLL_PERIOD_MS;
w5500_config.base.poll_period_ms = CONFIG_W5500_POLL_PERIOD_MS;
}
eth_mac_config_t mac_config = ETH_MAC_DEFAULT_CONFIG();
@@ -454,7 +458,8 @@ void app_main(void)
bool held = ap_button_held();
s_ap_on = settings_bool("ap_enabled", true) || held;
ESP_LOGI(TAG, "AP %s%s", s_ap_on ? "on" : "off", held ? " (button held)" : "");
espnow_tx_set_bridge(settings_str("bridge")); // led-simulator stands in for the radio
char bridges[BRIDGE_MAX_LINKS][BRIDGE_ADDR_MAX]; // led-simulator or a network/USB bridge stands in for the radio
espnow_tx_set_bridges(bridges, store_bridges(bridges, BRIDGE_MAX_LINKS));
ESP_ERROR_CHECK(espnow_tx_init(s_ap_on ? (host ? host : DEFAULT_HOSTNAME) : NULL, settings_str("ap_password")));
// Ethernet is optional: without it the web UI is still served over the AP