Skip to content

Automatically configure OTA for MKRMEM/SFU ... #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/ArduinoIoTCloudTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "tls/utility/CryptoUtil.h"
#endif

#include "utility/ota/OTAStorage_MKRMEM.h"

#include "cbor/CBOREncoder.h"

/******************************************************************************
Expand All @@ -37,6 +39,10 @@

TimeService time_service;

#if OTA_STORAGE_MKRMEM
static OTAStorage_MKRMEM ota_storage_sfu;
#endif /* OTA_STORAGE_MKRMEM */

/******************************************************************************
GLOBAL CONSTANTS
******************************************************************************/
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions src/utility/ota/OTAStorage_MKRMEM.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

#include "OTAStorage.h"

#include <SFU.h>

#include <Arduino_MKRMEM.h>

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