Skip to content

Commit c399baf

Browse files
committed
Class memeber cleanup
1 parent e8028be commit c399baf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ArduinoIoTCloud.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ int ArduinoIoTCloudClass::connect()
188188
_mqttClient->subscribe(_dataTopicIn);
189189
_mqttClient->subscribe(_shadowTopicIn);
190190

191-
syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES;
191+
_syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES;
192192
_lastSyncRequestTickTime = 0;
193193

194194
return 1;
@@ -226,7 +226,7 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
226226
// MTTQClient connected!, poll() used to retrieve data from MQTT broker
227227
_mqttClient->poll();
228228

229-
switch (syncStatus) {
229+
switch (_syncStatus) {
230230
case ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED:
231231
sendPropertiesToCloud();
232232
break;
@@ -239,7 +239,7 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
239239
case ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED:
240240
if(onSyncCompleteCallback != NULL)
241241
(*onSyncCompleteCallback)();
242-
syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
242+
_syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
243243
break;
244244
}
245245
}
@@ -341,10 +341,10 @@ void ArduinoIoTCloudClass::handleMessage(int length)
341341
if (_dataTopicIn == topic) {
342342
Thing.decode((uint8_t*)bytes, length);
343343
}
344-
if ((_shadowTopicIn == topic) && syncStatus == ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES) {
344+
if ((_shadowTopicIn == topic) && _syncStatus == ArduinoIoTSynchronizationStatus::SYNC_STATUS_WAIT_FOR_CLOUD_VALUES) {
345345
Thing.decode((uint8_t*)bytes, length, true);
346346
sendPropertiesToCloud();
347-
syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED;
347+
_syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_VALUES_PROCESSED;
348348
}
349349
}
350350

src/ArduinoIoTCloud.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class ArduinoIoTCloudClass {
143143
ConnectionManager *connection;
144144
static void onMessage(int length);
145145
void handleMessage(int length);
146-
ArduinoIoTSynchronizationStatus syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
146+
ArduinoIoTSynchronizationStatus _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
147147

148148
void sendPropertiesToCloud();
149149

0 commit comments

Comments
 (0)