Skip to content

Commit b042af3

Browse files
committed
Make NINA FW OTA error available as OTA_ERROR property
1 parent 45d5672 commit b042af3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: src/utility/ota/OTA-samd.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int samd_onOTARequest(char const * ota_url)
5252
if (!WiFiStorage.downloadOTA(ota_url, &nina_ota_err_code))
5353
{
5454
DEBUG_ERROR("ArduinoIoTCloudTCP::%s error download to nina: %d", __FUNCTION__, nina_ota_err_code);
55-
return static_cast<int>(OTAError::DownloadFailed);
55+
return (NINAFW_OTA_ERROR_BASE - nina_ota_err_code);
5656
}
5757

5858
/* Perform the reset to reboot to SxU. */

Diff for: src/utility/ota/OTA.h

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
******************************************************************************/
3030

3131
#define RP2040_OTA_ERROR_BASE (-100)
32+
#define NINAFW_OTA_ERROR_BASE (-200)
3233

3334
/******************************************************************************
3435
* TYPEDEF

0 commit comments

Comments
 (0)