Skip to content

Commit 9bb4dcc

Browse files
committed
Make NINA FW OTA error available as OTA_ERROR property
1 parent 6a9acc2 commit 9bb4dcc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/utility/ota/OTA-samd.cpp

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

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

src/utility/ota/OTA.h

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
******************************************************************************/
3434

3535
#define RP2040_OTA_ERROR_BASE (-100)
36+
#define NINAFW_OTA_ERROR_BASE (-200)
3637

3738
/******************************************************************************
3839
* TYPEDEF

0 commit comments

Comments
 (0)