Skip to content

Commit

Permalink
Merge pull request #428 from zfields/zak-lpwan
Browse files Browse the repository at this point in the history
chore: Switch LPWAN off deprecated method
  • Loading branch information
pennam authored May 6, 2024
2 parents cd09f04 + 73fd287 commit 756c5f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/AIoTC_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions src/ArduinoIoTCloudLPWAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ArduinoIoTCloudLPWAN::ArduinoIoTCloudLPWAN()
: _state{State::ConnectPhy}
, _retryEnable{false}
, _maxNumRetry{5}
, _intervalRetry{1000}
, _intervalRetry{AIOT_CONFIG_INTERVAL_RETRY_DELAY_ms}
{

}
Expand All @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/property/PropertyContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 756c5f7

Please sign in to comment.