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