diff --git a/src/utility/ota/OTA-samd.cpp b/src/utility/ota/OTA-samd.cpp index f555415b..36dde769 100644 --- a/src/utility/ota/OTA-samd.cpp +++ b/src/utility/ota/OTA-samd.cpp @@ -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(OTAError::DownloadFailed); + return (NINAFW_OTA_ERROR_BASE - nina_ota_err_code); } /* Perform the reset to reboot to SxU. */ diff --git a/src/utility/ota/OTA.h b/src/utility/ota/OTA.h index d5364242..5483c16f 100644 --- a/src/utility/ota/OTA.h +++ b/src/utility/ota/OTA.h @@ -29,6 +29,7 @@ ******************************************************************************/ #define RP2040_OTA_ERROR_BASE (-100) +#define NINAFW_OTA_ERROR_BASE (-200) /****************************************************************************** * TYPEDEF