show ntp connect in log

This commit is contained in:
MichaelDvP
2025-05-10 13:36:40 +02:00
parent bb60568d83
commit dc1094b6ba

View File

@@ -2001,9 +2001,13 @@ std::string System::reset_reason(uint8_t cpu) const {
// set NTP status
void System::ntp_connected(bool b) {
if (b != ntp_connected_ && !b) {
if (b != ntp_connected_) {
if (b) {
LOG_INFO("NTP connected");
} else {
LOG_WARNING("NTP disconnected"); // if turned off report it
}
}
ntp_connected_ = b;
ntp_last_check_ = b ? uuid::get_uptime_sec() : 0;