#pragma once #include "esp_err.h" #include "esp_http_server.h" // Update led-driver app files (.py) over ESP-NOW. Wire format is documented in // led-driver/src/espnow_ota.py; tools/driver_ota.py drives a session: // // POST /drivers/ota/file?mac=<12hex>[,<12hex>...]|all&sess=<1..65535>&path=

&sha=<64hex> // body: the raw file (0..64 KB). One driver gets the chunks by acked unicast; several get // one broadcast, then each is asked for its missing chunks and repaired by unicast. // Reply: {"":{"result":"same|written|error","code":"...","repaired":n}, ...} // POST /drivers/ota/commit?mac=...&sess= drivers move their staged files into place and reset // POST /drivers/ota/abort?mac=...&sess= drivers drop their staged files // // mac=all means every ESP-NOW device in the devices collection. One request runs at a time. esp_err_t drv_ota_register(httpd_handle_t server);