Skip to content

Commit 756c5f7

Browse files
authored
Merge pull request #428 from zfields/zak-lpwan
chore: Switch LPWAN off deprecated method
2 parents cd09f04 + 73fd287 commit 756c5f7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/AIoTC_Config.h

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
* CONSTANTS
138138
******************************************************************************/
139139

140+
#define AIOT_CONFIG_INTERVAL_RETRY_DELAY_ms (10000UL)
140141
#define AIOT_CONFIG_RECONNECTION_RETRY_DELAY_ms (1000UL)
141142
#define AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms (32000UL)
142143
#define AIOT_CONFIG_DEVICE_TOPIC_SUBSCRIBE_RETRY_DELAY_ms (5*1000UL)

src/ArduinoIoTCloudLPWAN.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ArduinoIoTCloudLPWAN::ArduinoIoTCloudLPWAN()
5050
: _state{State::ConnectPhy}
5151
, _retryEnable{false}
5252
, _maxNumRetry{5}
53-
, _intervalRetry{1000}
53+
, _intervalRetry{AIOT_CONFIG_INTERVAL_RETRY_DELAY_ms}
5454
{
5555

5656
}
@@ -61,7 +61,7 @@ ArduinoIoTCloudLPWAN::ArduinoIoTCloudLPWAN()
6161

6262
int ArduinoIoTCloudLPWAN::connected()
6363
{
64-
return (_connection->getStatus() == NetworkConnectionState::CONNECTED) ? 1 : 0;
64+
return (_connection->check() == NetworkConnectionState::CONNECTED) ? 1 : 0;
6565
}
6666

6767
int ArduinoIoTCloudLPWAN::begin(ConnectionHandler& connection, bool retry)
@@ -105,8 +105,7 @@ ArduinoIoTCloudLPWAN::State ArduinoIoTCloudLPWAN::handle_ConnectPhy()
105105

106106
ArduinoIoTCloudLPWAN::State ArduinoIoTCloudLPWAN::handle_SyncTime()
107107
{
108-
unsigned long const internal_posix_time = _time_service.getTime();
109-
DEBUG_VERBOSE("ArduinoIoTCloudLPWAN::%s internal clock configured to posix timestamp %d", __FUNCTION__, internal_posix_time);
108+
DEBUG_VERBOSE("ArduinoIoTCloudLPWAN::%s internal clock configured to posix timestamp %lu", __FUNCTION__, _time_service.getTime());
110109
DEBUG_INFO("Connected to Arduino IoT Cloud");
111110
return State::Connected;
112111
}

src/property/PropertyContainer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void requestUpdateForAllProperties(PropertyContainer & prop_cont)
9595

9696
void updateTimestampOnLocallyChangedProperties(PropertyContainer & prop_cont)
9797
{
98-
/* This function updates the timestamps on the primitive properties
98+
/* This function updates the timestamps on the primitive properties
9999
* that have been modified locally since last cloud synchronization
100100
*/
101101
std::for_each(prop_cont.begin(),

0 commit comments

Comments
 (0)