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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user