diff --git a/src/ArduinoIoTCloudTCP.cpp b/src/ArduinoIoTCloudTCP.cpp index ecdaa6df5..705f5d36b 100644 --- a/src/ArduinoIoTCloudTCP.cpp +++ b/src/ArduinoIoTCloudTCP.cpp @@ -29,6 +29,8 @@ #include "tls/utility/CryptoUtil.h" #endif +#include "utility/ota/OTAStorage_MKRMEM.h" + #include "cbor/CBOREncoder.h" /****************************************************************************** @@ -37,6 +39,10 @@ TimeService time_service; +#if OTA_STORAGE_MKRMEM + static OTAStorage_MKRMEM ota_storage_sfu; +#endif /* OTA_STORAGE_MKRMEM */ + /****************************************************************************** GLOBAL CONSTANTS ******************************************************************************/ @@ -135,6 +141,10 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort) printConnectionStatus(_iot_status); +#if OTA_STORAGE_MKRMEM + setOTAStorage(ota_storage_sfu); +#endif /* OTA_STORAGE_MKRMEM */ + return 1; } diff --git a/src/utility/ota/OTAStorage_MKRMEM.h b/src/utility/ota/OTAStorage_MKRMEM.h index 26f4f0fc2..a732aa40c 100644 --- a/src/utility/ota/OTAStorage_MKRMEM.h +++ b/src/utility/ota/OTAStorage_MKRMEM.h @@ -27,6 +27,8 @@ #include "OTAStorage.h" +#include + #include /******************************************************************************