Skip to content

Commit

Permalink
Make NINA FW OTA error available as OTA_ERROR property
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Mar 11, 2022
1 parent 45d5672 commit b042af3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/utility/ota/OTA-samd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int samd_onOTARequest(char const * ota_url)
if (!WiFiStorage.downloadOTA(ota_url, &nina_ota_err_code))
{
DEBUG_ERROR("ArduinoIoTCloudTCP::%s error download to nina: %d", __FUNCTION__, nina_ota_err_code);
return static_cast<int>(OTAError::DownloadFailed);
return (NINAFW_OTA_ERROR_BASE - nina_ota_err_code);
}

/* Perform the reset to reboot to SxU. */
Expand Down
1 change: 1 addition & 0 deletions src/utility/ota/OTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
******************************************************************************/

#define RP2040_OTA_ERROR_BASE (-100)
#define NINAFW_OTA_ERROR_BASE (-200)

/******************************************************************************
* TYPEDEF
Expand Down

0 comments on commit b042af3

Please sign in to comment.