File tree Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -186,23 +186,26 @@ void ArduinoIoTCloudTCP::update()
186186 // MTTQClient connected!, poll() used to retrieve data from MQTT broker
187187 _mqttClient->poll ();
188188
189- switch (_syncStatus) {
190- case ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED: {
191- sendPropertiesToCloud ();
192- }
193- break ;
194- case ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES: {
195- if (millis () - _lastSyncRequestTickTime > TIMEOUT_FOR_LASTVALUES_SYNC) {
196- requestLastValue ();
197- _lastSyncRequestTickTime = millis ();
198- }
199- }
200- break ;
201- case ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED: {
202- execCloudEventCallback (ArduinoIoTCloudEvent::SYNC);
203- _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
189+ switch (_syncStatus)
190+ {
191+ case ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED: sendPropertiesToCloud (); break ;
192+
193+ case ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES:
194+ {
195+ if (millis () - _lastSyncRequestTickTime > TIMEOUT_FOR_LASTVALUES_SYNC)
196+ {
197+ requestLastValue ();
198+ _lastSyncRequestTickTime = millis ();
204199 }
205- break ;
200+ }
201+ break ;
202+
203+ case ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED:
204+ {
205+ execCloudEventCallback (ArduinoIoTCloudEvent::SYNC);
206+ _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
207+ }
208+ break ;
206209 }
207210}
208211
You can’t perform that action at this time.
0 commit comments