File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,23 +43,23 @@ int esp32_onOTARequest(char const * ota_url)
4343 if ((ota_err = ota.begin ()) != Arduino_ESP32_OTA::Error::None)
4444 {
4545 DEBUG_ERROR (" Arduino_ESP32_OTA::begin() failed with %d" , static_cast <int >(ota_err));
46- return static_cast <int >(ota_err);
46+ return (ESP32_OTA_ERROR_BASE + static_cast <int >(ota_err) );
4747 }
4848
4949 /* Download the OTA file from the web storage location. */
5050 int const ota_download = ota.download (ota_url);
5151 if (ota_download <= 0 )
5252 {
5353 DEBUG_ERROR (" Arduino_ESP_OTA::download() failed with %d" , ota_download);
54- return ota_download;
54+ return (ESP32_OTA_ERROR_BASE + ota_download) ;
5555 }
5656 DEBUG_VERBOSE (" Arduino_ESP_OTA::download() %d bytes downloaded" , static_cast <int >(ota_download));
5757
5858 /* Verify update integrity and apply */
5959 if ((ota_err = ota.update ()) != Arduino_ESP32_OTA::Error::None)
6060 {
6161 DEBUG_ERROR (" Arduino_ESP_OTA::update() failed with %d" , static_cast <int >(ota_err));
62- return static_cast <int >(ota_err);
62+ return (ESP32_OTA_ERROR_BASE + static_cast <int >(ota_err) );
6363 }
6464
6565 /* Perform the reset to reboot */
Original file line number Diff line number Diff line change 3333 ******************************************************************************/
3434
3535#define RP2040_OTA_ERROR_BASE (-100 )
36+ #define ESP32_OTA_ERROR_BASE (-300 )
3637
3738/* *****************************************************************************
3839 * TYPEDEF
You can’t perform that action at this time.
0 commit comments