Skip to content

Commit 5b00945

Browse files
committed
When calling ArduinoCloud.push() then the _update_requested flag of all properties is set leading to encoding and a transmission to the cloud on the next call to update
1 parent a30135f commit 5b00945

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/ArduinoIoTCloud.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
* PUBLIC MEMBER FUNCTIONS
2626
******************************************************************************/
2727

28+
void ArduinoIoTCloudClass::push()
29+
{
30+
_property_container.requestUpdateForAllProperties();
31+
}
32+
2833
void ArduinoIoTCloudClass::addCallback(ArduinoIoTCloudEvent const event, OnCloudEventCallback callback)
2934
{
3035
_cloud_event_callback[static_cast<size_t>(event)] = callback;

src/ArduinoIoTCloud.h

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class ArduinoIoTCloudClass
8787
virtual int connected () = 0;
8888
virtual void printDebugInfo() = 0;
8989

90+
void push();
91+
9092
inline void setThingId (String const thing_id) { _thing_id = thing_id; };
9193
inline String & getThingId () { return _thing_id; };
9294
inline void setDeviceId(String const device_id) { _device_id = device_id; };

0 commit comments

Comments
 (0)