Skip to content

Add hiddden property OTA_CAP for signaling OTA update capability #192

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
Aug 24, 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
5 changes: 5 additions & 0 deletions src/ArduinoIoTCloudTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ ArduinoIoTCloudTCP::ArduinoIoTCloudTCP()
, _dataTopicOut("")
, _dataTopicIn("")
#if OTA_ENABLED
, _ota_cap{false}
, _ota_error{static_cast<int>(OTAError::None)}
, _ota_img_sha256{"Inv."}
, _ota_url{""}
Expand Down Expand Up @@ -136,6 +137,10 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
_dataTopicIn = getTopic_datain();

#if OTA_ENABLED
#if OTA_STORAGE_SNU
_ota_cap = true;
#endif
addPropertyReal(_ota_cap, "OTA_CAP", Permission::Read);
addPropertyReal(_ota_error, "OTA_ERROR", Permission::Read);
addPropertyReal(_ota_img_sha256, "OTA_SHA256", Permission::Read);
addPropertyReal(_ota_url, "OTA_URL", Permission::ReadWrite).onSync(DEVICE_WINS);
Expand Down
1 change: 1 addition & 0 deletions src/ArduinoIoTCloudTCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
String _dataTopicIn;

#if OTA_ENABLED
bool _ota_cap;
int _ota_error;
String _ota_img_sha256;
String _ota_url;
Expand Down