Skip to content

Commit b93768d

Browse files
authored
Merge pull request #452 from pennam/cellular
Add Cellular support using Arduino Mid Carrier
2 parents 092d7ac + f9c4543 commit b93768d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: .github/workflows/compile-examples.yml

+3
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ jobs:
170170
- name: arduino:mbed_portenta
171171
libraries: |
172172
- name: ArduinoECCX08
173+
- name: Arduino_Cellular
173174
sketch-paths: |
174175
- examples/ArduinoIoTCloud-DeferredOTA
175176
- examples/utility/Provisioning
@@ -211,6 +212,8 @@ jobs:
211212
platforms: |
212213
# Install renesas_portenta platform via Boards Manager
213214
- name: arduino:renesas_portenta
215+
libraries: |
216+
- name: Arduino_Cellular
214217
sketch-paths: |
215218
- examples/utility/Provisioning
216219
# UNO R4 WiFi

Diff for: src/utility/time/TimeService.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,11 @@ unsigned long TimeServiceClass::getRemoteTime()
292292
* This is the most reliable time source and it will
293293
* ensure a correct behaviour of the library.
294294
*/
295-
unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP());
296-
if(isTimeValid(ntp_time)) {
297-
return ntp_time;
295+
if(_con_hdl->getInterface() != NetworkAdapter::CELL) {
296+
unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP());
297+
if(isTimeValid(ntp_time)) {
298+
return ntp_time;
299+
}
298300
}
299301

300302
/* As fallback if NTP request fails try to obtain the

0 commit comments

Comments
 (0)