From 0dfcb7220690b879e276e13fe324601f28272ece Mon Sep 17 00:00:00 2001 From: Niel Nielsen Date: Thu, 3 Sep 2026 10:44:08 +0200 Subject: [PATCH] Enhance documentation for OTA write function Added comments to clarify OTA write behavior and timeout handling. Signed-off-by: Niel Nielsen --- armsrc/bwm_wifi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/armsrc/bwm_wifi.c b/armsrc/bwm_wifi.c index b9362cfaf..545a095c3 100644 --- a/armsrc/bwm_wifi.c +++ b/armsrc/bwm_wifi.c @@ -322,6 +322,11 @@ int bwm_esp_ota_begin(uint32_t total_size) { } int bwm_esp_ota_write(const uint8_t *data, uint16_t len) { + // Documented OTA has no resume/offset: the payload is the raw chunk, written + // sequentially. A dropped chunk cannot be re-sent (it would double-write and + // fail the OTA_END size check) - recovery is to restart the whole OTA, which + // the client does. Keep a generous timeout so a slow flash write is not + // mistaken for a drop. return bwm_cmd(BWM_CMD_OTA_WRITE, data, len, NULL, NULL, 15000); }