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
+15 -2
View File
@@ -938,8 +938,21 @@
return rows;
},
applyOTAProgress(p) {
this.ota.phase = p.phase || '';
this.ota.step = p.step || this.ota.step || '';
const prevPhase = this.ota.phase;
const prevStep = this.ota.step;
if (p.phase) {
// Ignore out-of-order master upload updates after distribution started.
if (!(p.phase === 'uploading' && prevPhase === 'distributing')) {
this.ota.phase = p.phase;
}
}
if (p.step) {
if (!(p.step === 'master' && (prevStep === 'slaves' || prevPhase === 'distributing'))) {
this.ota.step = p.step;
}
} else if (!this.ota.step) {
this.ota.step = '';
}
this.ota.percent = p.percent ?? this.ota.percent;
this.ota.message = p.message || '';
if (p.image_size) this.ota.imageSize = p.image_size;