Add LED ring control per client and broadcast over REST and WebSocket.

Solid color mode fills all ring LEDs; master routes UART commands to slaves
via ESPNOW_LED_RING. goTool exposes POST /api/led-ring, WebSocket set_led_ring,
and a dashboard LED panel with master/slave/all targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 19:24:55 +02:00
co-authored by Cursor
parent 47c75110c9
commit eb67a46158
21 changed files with 759 additions and 133 deletions
+16
View File
@@ -19,6 +19,7 @@ enum EspNowMessageType {
ESPNOW_RESTART = 11;
ESPNOW_ACCEL_SAMPLE = 12;
ESPNOW_SET_ACCEL_STREAM = 13;
ESPNOW_LED_RING = 14;
}
message EspNowUnicastTest {
@@ -68,6 +69,20 @@ message EspNowAccelSample {
sint32 z = 4;
}
/** Master → slave: LED ring command (same modes as UART LedRingProgressRequest). */
message EspNowLedRing {
uint32 client_id = 1;
uint32 mode = 2;
uint32 progress = 3;
uint32 digit = 4;
uint32 r = 5;
uint32 g = 6;
uint32 b = 7;
uint32 intensity = 8;
uint32 blink_ms = 9;
uint32 blink_count = 10;
}
// Master → slave: begin OTA (erase inactive slot; slave replies ESPNOW_OTA_STATUS).
message EspNowOtaStart {
uint32 total_size = 1;
@@ -105,5 +120,6 @@ message EspNowMessage {
EspNowRestart restart = 12;
EspNowAccelSample accel_sample = 13;
EspNowAccelStream accel_stream = 14;
EspNowLedRing led_ring = 15;
}
}