Add RESTART command for master and slaves via ESP-NOW.

UART RESTART (client_id 0 = local reboot, >0 = unicast); dashboard and CLI hooks; delayed esp_restart after response.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-19 22:33:22 +02:00
co-authored by Cursor
parent 5c3cf65bca
commit a9e08107b4
23 changed files with 625 additions and 61 deletions
+13
View File
@@ -21,6 +21,7 @@ enum MessageType {
OTA_START_ESPNOW = 20;
OTA_SLAVE_PROGRESS = 21;
FIND_ME = 22;
RESTART = 23;
}
message UartMessage {
@@ -45,6 +46,8 @@ message UartMessage {
LedRingProgressResponse led_ring_progress_response = 18;
EspNowFindMeRequest espnow_find_me_request = 19;
EspNowFindMeResponse espnow_find_me_response = 20;
RestartRequest restart_request = 21;
RestartResponse restart_response = 22;
}
}
@@ -149,6 +152,16 @@ message EspNowFindMeResponse {
uint32 client_id = 2;
}
/** Host → master: restart local node (client_id=0) or ESP-NOW unicast to one slave. */
message RestartRequest {
uint32 client_id = 1;
}
message RestartResponse {
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;