Add find-me LED locate on master and slaves via ESP-NOW.

UART FIND_ME (client_id 0 = local ring, >0 = unicast), ESPNOW_FIND_ME payload, CLI/dashboard buttons per slave.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-19 22:04:07 +02:00
co-authored by Cursor
parent 8931912583
commit efd6260201
25 changed files with 659 additions and 84 deletions
+15 -2
View File
@@ -20,6 +20,7 @@ enum MessageType {
OTA_STATUS = 19;
OTA_START_ESPNOW = 20;
OTA_SLAVE_PROGRESS = 21;
FIND_ME = 22;
}
message UartMessage {
@@ -42,6 +43,8 @@ message UartMessage {
OtaSlaveProgressResponse ota_slave_progress_response = 16;
LedRingProgressRequest led_ring_progress_request = 17;
LedRingProgressResponse led_ring_progress_response = 18;
EspNowFindMeRequest espnow_find_me_request = 19;
EspNowFindMeResponse espnow_find_me_response = 20;
}
}
@@ -110,8 +113,8 @@ message EspNowUnicastTestResponse {
uint32 seq = 2;
}
// Host → device: LED ring display (progress bar, digit, clear, or blink).
// mode: 0=clear, 1=progress (0100 %), 2=digit (010), 3=blink full ring.
// Host → device: LED ring display (progress bar, digit, clear, blink, or find-me).
// mode: 0=clear, 1=progress (0100 %), 2=digit (010), 3=blink full ring, 4=find-me (R/G/B ×3 @ full brightness).
message LedRingProgressRequest {
uint32 mode = 1;
/** 0100: fraction of ring LEDs to light (mode=progress) */
@@ -136,6 +139,16 @@ message LedRingProgressResponse {
uint32 digit = 4;
}
/** Host → master: find-me on local ring (client_id=0) or ESP-NOW unicast to one slave. */
message EspNowFindMeRequest {
uint32 client_id = 1;
}
message EspNowFindMeResponse {
bool success = 1;
uint32 client_id = 2;
}
// Host → device: begin UART OTA (erase inactive OTA slot; device replies OTA_STATUS).
message OtaStartPayload {
uint32 total_size = 1;