feat: web UI with AP, Wi-Fi client, mDNS, presets, OTA and DDP
- Wi-Fi access point led-XXXXXX plus a client network, configurable mDNS name and static client address - Preset tiles with an editor, drag to reorder, default presets, global brightness, Run and Edit modes, collapsible menu on phones - 35 patterns ported from led-driver, up to 512 LEDs, colour order, max brightness and data pin settings - Over-the-air updates (POST /ota) with rollback, and a CLI in tools/ota.py - DDP receiver on UDP 4048 with tools/ddp_test.py - LED refresh every 10 ms; lwIP sockets raised to 16 so mDNS, HTTP and DDP can run together Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
89f996096c
commit
9a04d28ecf
32 files changed
+6210
-398
No files matched your search
+24
-3
@@ -166,9 +166,30 @@ void WS2812::set(size_t index, uint8_t r, uint8_t g, uint8_t b)
|
||||
return;
|
||||
}
|
||||
uint8_t *p = &pixels_[index * 3];
|
||||
p[0] = g;
|
||||
p[1] = r;
|
||||
p[2] = b;
|
||||
uint8_t c[3] = { r, g, b };
|
||||
p[0] = c[order_[0]];
|
||||
p[1] = c[order_[1]];
|
||||
p[2] = c[order_[2]];
|
||||
}
|
||||
|
||||
void WS2812::setOrder(const char *order)
|
||||
{
|
||||
if (!order || strlen(order) != 3) {
|
||||
return;
|
||||
}
|
||||
uint8_t idx[3];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
switch (order[i]) {
|
||||
case 'r': idx[i] = 0; break;
|
||||
case 'g': idx[i] = 1; break;
|
||||
case 'b': idx[i] = 2; break;
|
||||
default: return;
|
||||
}
|
||||
}
|
||||
if (idx[0] == idx[1] || idx[1] == idx[2] || idx[0] == idx[2]) {
|
||||
return;
|
||||
}
|
||||
memcpy(order_, idx, sizeof(order_));
|
||||
}
|
||||
|
||||
void WS2812::fill(uint8_t r, uint8_t g, uint8_t b)
|
||||
|
||||
Reference in new issue
Block a user