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:
authored and GitHub committed 2026-09-25 12:04:40 +00:00
1 parent c57da9a09d
commit 57937c5ccc
1 file changed
+3
+3
View File
@@ -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