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

+9 -40
View File
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <string.h>
#include "api_util.h"
#include "dmx_wire.h"
#include "esp_mac.h"
#include "esp_timer.h"
#include "freertos/FreeRTOS.h"
@@ -181,7 +182,7 @@ static bool resolve(out_t *o, int universe_for_sacn)
o->to.sin_port = htons(o->port);
if (!o->host[0]) {
if (!strcmp(o->proto, "sacn")) { // multicast group of the universe
o->to.sin_addr.s_addr = htonl(0xEFFF0000 | (universe_for_sacn & 0xFFFF));
o->to.sin_addr.s_addr = htonl(dmx_sacn_group(universe_for_sacn));
} else {
o->to.sin_addr.s_addr = htonl(INADDR_BROADCAST);
}
@@ -228,59 +229,27 @@ static void send_ddp(out_t *o, const uint8_t *data, size_t len)
static void send_artnet(out_t *o, const uint8_t *data, size_t len)
{
static uint8_t pkt[18 + UNIVERSE_BYTES + 1];
static uint8_t pkt[DMX_PACKET_MAX];
o->seq = o->seq % 255 + 1;
int base = o->universe;
for (size_t off = 0, u = 0; off < len; off += UNIVERSE_BYTES, u++) {
size_t n = len - off < UNIVERSE_BYTES ? len - off : UNIVERSE_BYTES;
size_t dl = n + (n & 1);
dl = dl < 2 ? 2 : dl;
int uni = base + u;
memcpy(pkt, "Art-Net\0", 8);
uint8_t h[10] = { 0x00, 0x50, 0, 14, o->seq, 0, uni & 0xFF, (uni >> 8) & 0x7F, dl >> 8, dl & 0xFF };
memcpy(pkt + 8, h, 10);
memset(pkt + 18, 0, dl);
memcpy(pkt + 18, data + off, n);
send_pkt(o, pkt, 18 + dl);
send_pkt(o, pkt, dmx_artnet_packet(pkt, o->seq, o->universe + u, data + off, n));
}
}
static void put16(uint8_t *p, unsigned v)
{
p[0] = v >> 8;
p[1] = v;
}
static void send_sacn(out_t *o, const uint8_t *data, size_t len)
{
static uint8_t pkt[126 + UNIVERSE_BYTES];
static uint8_t pkt[DMX_PACKET_MAX];
char source[64];
snprintf(source, sizeof(source), "led-controller %.48s", o->name);
o->seq++;
for (size_t off = 0, u = 0; off < len; off += UNIVERSE_BYTES, u++) {
size_t n = len - off < UNIVERSE_BYTES ? len - off : UNIVERSE_BYTES;
int uni = o->universe + u;
size_t total = 126 + n;
memset(pkt, 0, 126);
put16(pkt, 0x0010);
memcpy(pkt + 4, "ASC-E1.17\0\0\0", 12);
put16(pkt + 16, 0x7000 | (total - 16));
pkt[21] = 0x04;
memcpy(pkt + 22, o->cid, 16);
put16(pkt + 38, 0x7000 | (total - 38));
pkt[43] = 0x02;
snprintf((char *)pkt + 44, 64, "led-controller %.48s", o->name);
pkt[108] = 100;
pkt[111] = o->seq;
put16(pkt + 113, uni);
put16(pkt + 115, 0x7000 | (total - 115));
pkt[117] = 0x02;
pkt[118] = 0xA1;
put16(pkt + 121, 0x0001);
put16(pkt + 123, n + 1);
memcpy(pkt + 126, data + off, n);
if (!o->host[0]) {
o->to.sin_addr.s_addr = htonl(0xEFFF0000 | (uni & 0xFFFF));
o->to.sin_addr.s_addr = htonl(dmx_sacn_group(uni));
}
send_pkt(o, pkt, total);
send_pkt(o, pkt, dmx_sacn_packet(pkt, o->cid, source, o->seq, uni, data + off, n));
}
}