feat(espnow): app-file OTA over the reliable link
New espnow_ota module, loaded on the first OTA packet (types 0x07-0x0C, status reply 0x26). Files are written by chunk index to <path>.new, checked against their sha256, and moved into place together on commit, followed by a reset. Unchanged files are skipped, and a repeated commit after the reset still gets OK. - receive ESP-NOW frames from esp.irq() so frames are not lost while presets.tick() runs; polling remains as a fallback - raise rxbuf to 2048 and the link inbox to 24 frames - file_hashes: MicroPython's sha256 has no hexdigest() - bench stats line includes esp.stats() Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
940d1d0a77
commit
495da4e366
8 files changed
+577
-15
No files matched your search
+2
-1
@@ -9,6 +9,7 @@ Extra message types, all inside the existing wire magic 0x4C:
|
||||
0x23 RESYNC [4C][23][ver u16] driver -> controller
|
||||
0x24 ECHO [4C][24][beat_idx u16] driver -> controller, bench only
|
||||
0x25 BEAT [4C][25][flags][idx u16][period u16][fire_in] handled by BeatSync
|
||||
0x26 OTA [4C][26][sess u16][op][code] + arg driver -> controller, see espnow_ota.py
|
||||
Everything else (announce, groups, cmd, group cmd, plain JSON) goes straight to the handler.
|
||||
"""
|
||||
import struct
|
||||
@@ -25,7 +26,7 @@ F_ACK = 1
|
||||
F_COMMIT = 2
|
||||
HDR = 9
|
||||
|
||||
INBOX_MAX = 16
|
||||
INBOX_MAX = 24
|
||||
DONE_MAX = 16
|
||||
ASM_TIMEOUT_MS = 3000
|
||||
RESYNC_MIN_GAP_MS = 3000
|
||||
|
||||
Reference in new issue
Block a user