Skip to content

Commit

Permalink
changing download to downloadAndDecompress for mbed core
Browse files Browse the repository at this point in the history
  • Loading branch information
andreagilardoni committed Jan 15, 2024
1 parent d436b80 commit d39cd90
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/utility/ota/OTA-portenta-h7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,11 @@ int portenta_h7_onOTARequest(char const * ota_url, NetworkAdapter iface)
download_socket = static_cast<MbedSocketClass*>(&Ethernet);
}
#endif
int const ota_portenta_qspi_download_ret_code = ota_portenta_qspi.download(ota_url, true /* is_https */, download_socket);
int const ota_portenta_qspi_download_ret_code = ota_portenta_qspi.downloadAndDecompress(ota_url, true /* is_https */, download_socket);
DEBUG_VERBOSE("Arduino_Portenta_OTA_QSPI::download(%s) returns %d", ota_url, ota_portenta_qspi_download_ret_code);

watchdog_reset();

/* Decompress the LZSS compressed OTA file. */
int const ota_portenta_qspi_decompress_ret_code = ota_portenta_qspi.decompress();
DEBUG_VERBOSE("Arduino_Portenta_OTA_QSPI::decompress() returns %d", ota_portenta_qspi_decompress_ret_code);
if (ota_portenta_qspi_decompress_ret_code < 0)
{
DEBUG_ERROR("Arduino_Portenta_OTA_QSPI::decompress() failed with %d", ota_portenta_qspi_decompress_ret_code);
return ota_portenta_qspi_decompress_ret_code;
}

watchdog_reset();

/* Schedule the firmware update. */
if((ota_portenta_err = ota_portenta_qspi.update()) != Arduino_Portenta_OTA::Error::None) {
DEBUG_ERROR("Arduino_Portenta_OTA_QSPI::update() failed with %d", static_cast<int>(ota_portenta_err));
Expand Down

0 comments on commit d39cd90

Please sign in to comment.