File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -741,13 +741,15 @@ void ArduinoIoTCloudTCP::sendPropertiesToCloud()
741
741
}
742
742
743
743
#if OTA_ENABLED
744
- void ArduinoIoTCloudTCP::sendOTAPropertiesToCloud ()
744
+ void ArduinoIoTCloudTCP::sendOTAPropertiesToCloud (bool include_ota_req )
745
745
{
746
746
PropertyContainer ota_property_container;
747
747
748
- std::list<String> const ota_property_list {" OTA_CAP" , " OTA_ERROR" , " OTA_SHA256" };
749
- std::for_each (ota_property_list.cbegin (),
750
- ota_property_list.cend (),
748
+ std::list<String> ota_property_list {" OTA_CAP" , " OTA_ERROR" , " OTA_SHA256" };
749
+ if (include_ota_req)
750
+ ota_property_list.push_back (" OTA_REQ" );
751
+ std::for_each (ota_property_list.begin (),
752
+ ota_property_list.end (),
751
753
[this , &ota_property_container ] (String const & name)
752
754
{
753
755
Property* p = getProperty (this ->_device_property_container , name);
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
187
187
188
188
#if OTA_ENABLED
189
189
void onOTARequest ();
190
- void sendOTAPropertiesToCloud ();
190
+ void sendOTAPropertiesToCloud (bool include_ota_req = false );
191
191
#endif
192
192
193
193
void updateThingTopics ();
@@ -200,4 +200,4 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
200
200
201
201
extern ArduinoIoTCloudTCP ArduinoCloud;
202
202
203
- #endif
203
+ #endif
You can’t perform that action at this time.
0 commit comments