Add UART LED_RING command for progress bar, digits, and clear.

Stop the main-loop digit demo so host-driven display persists; expose
clear/progress/digit modes with RGB and intensity via protobuf and goTool.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-19 21:18:18 +02:00
co-authored by Cursor
parent a0f4a81a55
commit 508b684fdf
16 changed files with 649 additions and 66 deletions
+25
View File
@@ -13,6 +13,7 @@ enum MessageType {
CLIENT_INPUT = 5;
ACCEL_DEADZONE = 6;
ESPNOW_UNICAST_TEST = 7;
LED_RING = 8;
OTA_START = 16;
OTA_PAYLOAD = 17;
OTA_END = 18;
@@ -39,6 +40,8 @@ message UartMessage {
EspNowUnicastTestResponse espnow_unicast_test_response = 14;
OtaSlaveProgressRequest ota_slave_progress_request = 15;
OtaSlaveProgressResponse ota_slave_progress_response = 16;
LedRingProgressRequest led_ring_progress_request = 17;
LedRingProgressResponse led_ring_progress_response = 18;
}
}
@@ -107,6 +110,28 @@ message EspNowUnicastTestResponse {
uint32 seq = 2;
}
// Host → device: LED ring display (progress bar, digit, or clear).
// mode: 0=clear, 1=progress (0100 %), 2=digit (010, same layout as firmware digit maps).
message LedRingProgressRequest {
uint32 mode = 1;
/** 0100: fraction of ring LEDs to light (mode=progress) */
uint32 progress = 2;
/** 010 (mode=digit) */
uint32 digit = 3;
uint32 r = 4;
uint32 g = 5;
uint32 b = 6;
/** 0255 brightness scale applied to r/g/b */
uint32 intensity = 7;
}
message LedRingProgressResponse {
bool success = 1;
uint32 mode = 2;
uint32 progress = 3;
uint32 digit = 4;
}
// Host → device: begin UART OTA (erase inactive OTA slot; device replies OTA_STATUS).
message OtaStartPayload {
uint32 total_size = 1;