diff --git a/src/AIoTC_Config.h b/src/AIoTC_Config.h index e47a8ac2b..7828191f0 100644 --- a/src/AIoTC_Config.h +++ b/src/AIoTC_Config.h @@ -137,6 +137,7 @@ * CONSTANTS ******************************************************************************/ +#define AIOT_CONFIG_INTERVAL_RETRY_DELAY_ms (10000UL) #define AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms (1000UL) #define AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms (32000UL) #define AIOT_CONFIG_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (5*1000UL) diff --git a/src/ArduinoIoTCloudLPWAN.cpp b/src/ArduinoIoTCloudLPWAN.cpp index 0f96d36db..e3f625fb7 100644 --- a/src/ArduinoIoTCloudLPWAN.cpp +++ b/src/ArduinoIoTCloudLPWAN.cpp @@ -50,7 +50,7 @@ ArduinoIoTCloudLPWAN::ArduinoIoTCloudLPWAN() : _state{State::ConnectPhy} , _retryEnable{false} , _maxNumRetry{5} -, _intervalRetry{1000} +, _intervalRetry{AIOT_CONFIG_INTERVAL_RETRY_DELAY_ms} { } @@ -61,7 +61,7 @@ ArduinoIoTCloudLPWAN::ArduinoIoTCloudLPWAN() int ArduinoIoTCloudLPWAN::connected() { - return (_connection->getStatus() == NetworkConnectionState::CONNECTED) ? 1 : 0; + return (_connection->check() == NetworkConnectionState::CONNECTED) ? 1 : 0; } int ArduinoIoTCloudLPWAN::begin(ConnectionHandler& connection, bool retry) @@ -105,8 +105,7 @@ ArduinoIoTCloudLPWAN::State ArduinoIoTCloudLPWAN::handle_ConnectPhy() ArduinoIoTCloudLPWAN::State ArduinoIoTCloudLPWAN::handle_SyncTime() { - unsigned long const internal_posix_time = _time_service.getTime(); - DEBUG_VERBOSE("ArduinoIoTCloudLPWAN::%s internal clock configured to posix timestamp %d", __FUNCTION__, internal_posix_time); + DEBUG_VERBOSE("ArduinoIoTCloudLPWAN::%s internal clock configured to posix timestamp %lu", __FUNCTION__, _time_service.getTime()); DEBUG_INFO("Connected to Arduino IoT Cloud"); return State::Connected; } diff --git a/src/property/PropertyContainer.cpp b/src/property/PropertyContainer.cpp index 833250f02..3ab4e75e0 100644 --- a/src/property/PropertyContainer.cpp +++ b/src/property/PropertyContainer.cpp @@ -95,7 +95,7 @@ void requestUpdateForAllProperties(PropertyContainer & prop_cont) void updateTimestampOnLocallyChangedProperties(PropertyContainer & prop_cont) { - /* This function updates the timestamps on the primitive properties + /* This function updates the timestamps on the primitive properties * that have been modified locally since last cloud synchronization */ std::for_each(prop_cont.begin(),