Fix web OTA upload and isolate OTA sessions across firmware and goTool.

Split ESP-NOW into core/master/slave modules, block non-OTA UART traffic during updates, and hold the host serial port exclusively so dashboard polling cannot interleave with firmware uploads.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 16:35:18 +02:00
co-authored by Cursor
parent 0cbc4d0644
commit 0eea27a876
29 changed files with 1828 additions and 1416 deletions
+11 -3
View File
@@ -33,12 +33,20 @@ static void handle_accel_stream(const uint8_t *data, size_t len) {
alox_UartMessage uart_msg;
alox_AccelStreamRequest req = alox_AccelStreamRequest_init_zero;
if (uart_cmd_decode(data, len, &uart_msg) == ESP_OK) {
if (len > 0) {
if (uart_cmd_decode(data, len, &uart_msg) != ESP_OK) {
ESP_LOGW(TAG, "decode failed");
reply(false, 0, false, 0);
return;
}
const alox_AccelStreamRequest *req_ptr = UART_CMD_REQ(
&uart_msg, alox_UartMessage_accel_stream_request_tag, accel_stream_request);
if (req_ptr != NULL) {
req = *req_ptr;
if (req_ptr == NULL) {
ESP_LOGW(TAG, "missing accel_stream_request");
reply(false, 0, false, 0);
return;
}
req = *req_ptr;
}
if (req.write) {