@@ -188,7 +188,7 @@ int ArduinoIoTCloudClass::connect()
188
188
_mqttClient->subscribe (_dataTopicIn);
189
189
_mqttClient->subscribe (_shadowTopicIn);
190
190
191
- syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES;
191
+ _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES;
192
192
_lastSyncRequestTickTime = 0 ;
193
193
194
194
return 1 ;
@@ -226,7 +226,7 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
226
226
// MTTQClient connected!, poll() used to retrieve data from MQTT broker
227
227
_mqttClient->poll ();
228
228
229
- switch (syncStatus ) {
229
+ switch (_syncStatus ) {
230
230
case ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED:
231
231
sendPropertiesToCloud ();
232
232
break ;
@@ -239,7 +239,7 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
239
239
case ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED:
240
240
if (onSyncCompleteCallback != NULL )
241
241
(*onSyncCompleteCallback)();
242
- syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
242
+ _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
243
243
break ;
244
244
}
245
245
}
@@ -341,10 +341,10 @@ void ArduinoIoTCloudClass::handleMessage(int length)
341
341
if (_dataTopicIn == topic) {
342
342
Thing.decode ((uint8_t *)bytes, length);
343
343
}
344
- if ((_shadowTopicIn == topic) && syncStatus == ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES) {
344
+ if ((_shadowTopicIn == topic) && _syncStatus == ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES) {
345
345
Thing.decode ((uint8_t *)bytes, length, true );
346
346
sendPropertiesToCloud ();
347
- syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED;
347
+ _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED;
348
348
}
349
349
}
350
350
0 commit comments