File tree 2 files changed +4
-3
lines changed
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)
43
43
if ((ota_err = ota.begin ()) != Arduino_ESP32_OTA::Error::None)
44
44
{
45
45
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) );
47
47
}
48
48
49
49
/* Download the OTA file from the web storage location. */
50
50
int const ota_download = ota.download (ota_url);
51
51
if (ota_download <= 0 )
52
52
{
53
53
DEBUG_ERROR (" Arduino_ESP_OTA::download() failed with %d" , ota_download);
54
- return ota_download;
54
+ return (ESP32_OTA_ERROR_BASE + ota_download) ;
55
55
}
56
56
DEBUG_VERBOSE (" Arduino_ESP_OTA::download() %d bytes downloaded" , static_cast <int >(ota_download));
57
57
58
58
/* Verify update integrity and apply */
59
59
if ((ota_err = ota.update ()) != Arduino_ESP32_OTA::Error::None)
60
60
{
61
61
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) );
63
63
}
64
64
65
65
/* Perform the reset to reboot */
Original file line number Diff line number Diff line change 33
33
******************************************************************************/
34
34
35
35
#define RP2040_OTA_ERROR_BASE (-100 )
36
+ #define ESP32_OTA_ERROR_BASE (-300 )
36
37
37
38
/* *****************************************************************************
38
39
* TYPEDEF
You can’t perform that action at this time.
0 commit comments