mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-09 14:41:19 -04:00
Fix NTP time detection on OpenWrt Portduino (#11919)
* Fix NTP time detection on OpenWrt Portduino * chore: trunk fmt --------- Co-authored-by: stm32repo <orangepimaster@gmail.com> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
1 file changed
+3
@@ -447,6 +447,9 @@ void setup()
|
||||
std::string timeCommandResult = exec("timedatectl status | grep synchronized | grep yes -c");
|
||||
if (timeCommandResult[0] == '1') {
|
||||
ourQuality = RTCQualityNTP;
|
||||
} else if (access("/var/state/dnsmasqsec", F_OK) == 0) {
|
||||
// OpenWrt marks the system time as valid after successful NTP synchronization.
|
||||
ourQuality = RTCQualityNTP;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user