Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cellular support using Arduino Mid Carrier #452

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/utility/time/TimeService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ unsigned long TimeServiceClass::getRemoteTime()
* This is the most reliable time source and it will
* ensure a correct behaviour of the library.
*/
unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP());
if(isTimeValid(ntp_time)) {
return ntp_time;
if(_con_hdl->getInterface() != NetworkAdapter::CELL) {
unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP());
if(isTimeValid(ntp_time)) {
return ntp_time;
}
}

/* As fallback if NTP request fails try to obtain the
Expand Down
Loading