Channel 11 defaults, ESP-NOW driver config and rig/desktop updates

Moves the controller, bridge and led-driver default ESP-NOW channel to 11 and
updates the led-driver and led-tool submodule pointers. Includes the rest of the
working tree: web UI, desktop and sim-controller changes, API and bridge code,
graphify output, and the .gitea and fixture-driver folders.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Haiku 5.5 committed 2026-11-21 01:19:02 +13:00
1 parent 35207a868a
commit edf35e9c71
280 files changed
+24043 -1756

No files matched your search

+6 -12
View File
@@ -31,7 +31,7 @@
static const char *TAG = "bridge";
#define DEFAULT_CHANNEL 6 // the controller's CONFIG_ESPNOW_CHANNEL
#define DEFAULT_CHANNEL 11 // until the controller sets one (SET_CHANNEL)
#define PEERS_MAX 19 // ESP-NOW allows 20 peers: 19 unicast and the broadcast one
#define TX_QUEUE_LEN 32
#define RX_QUEUE_LEN 32
@@ -189,7 +189,8 @@ static void ensure_peer(const uint8_t *mac)
{
if (memcmp(mac, BROADCAST, 6) == 0) {
if (!esp_now_is_peer_exist(BROADCAST)) {
esp_now_peer_info_t p = { .channel = s_channel, .ifidx = WIFI_IF_STA, .encrypt = false };
// Channel 0: the peer follows the radio's channel, so set_channel needs no peer changes
esp_now_peer_info_t p = { .channel = 0, .ifidx = WIFI_IF_STA, .encrypt = false };
memcpy(p.peer_addr, BROADCAST, 6);
esp_now_add_peer(&p);
}
@@ -208,7 +209,7 @@ static void ensure_peer(const uint8_t *mac)
esp_now_del_peer(s_peers[PEERS_MAX - 1]);
s_npeers--;
}
esp_now_peer_info_t p = { .channel = s_channel, .ifidx = WIFI_IF_STA, .encrypt = false };
esp_now_peer_info_t p = { .channel = 0, .ifidx = WIFI_IF_STA, .encrypt = false };
memcpy(p.peer_addr, mac, 6);
if (esp_now_add_peer(&p) != ESP_OK) {
return;
@@ -218,17 +219,10 @@ static void ensure_peer(const uint8_t *mac)
s_npeers++;
}
static void drop_unicast_peers(void)
{
for (int i = 0; i < s_npeers; i++) {
esp_now_del_peer(s_peers[i]);
}
s_npeers = 0;
}
// Peers were added with channel 0 (the radio's current channel), so they move with it. Peers pinned to a
// channel would make every send to them fail with a channel mismatch after a change, broadcast pings included.
static void set_channel(uint8_t ch)
{
drop_unicast_peers(); // peers were added on the old channel
s_channel = ch;
esp_wifi_set_channel(ch, WIFI_SECOND_CHAN_NONE);
nvs_handle_t h;