This commit is contained in:
jpirnay
2026-03-26 17:03:30 +01:00
parent dd9c9e6def
commit 2bcfa50a7c
2 changed files with 3 additions and 8 deletions
+2 -6
View File
@@ -48,9 +48,7 @@ static void setSystemClock(time_t epoch) {
settimeofday(&tv, nullptr); settimeofday(&tv, nullptr);
} }
static bool rtcValid() { static bool rtcValid() { return rtcClockMagic == CLOCK_RTC_MAGIC && rtcEpoch > 0; }
return rtcClockMagic == CLOCK_RTC_MAGIC && rtcEpoch > 0;
}
/// Capture current time + LP timer into RTC memory, and epoch into NVS. /// Capture current time + LP timer into RTC memory, and epoch into NVS.
static void capture() { static void capture() {
@@ -140,9 +138,7 @@ bool isSynced() {
return time(nullptr) > 1577836800; // > 2020-01-01 return time(nullptr) > 1577836800; // > 2020-01-01
} }
bool isApproximate() { bool isApproximate() { return clockApproximate; }
return clockApproximate;
}
void formatTime(char* buf, size_t bufSize, bool use24h) { void formatTime(char* buf, size_t bufSize, bool use24h) {
if (!isSynced()) { if (!isSynced()) {
+1 -2
View File
@@ -2,13 +2,12 @@
#include <GfxRenderer.h> #include <GfxRenderer.h>
#include <HalClock.h> #include <HalClock.h>
#include "CrossPointSettings.h"
#include <I18n.h> #include <I18n.h>
#include <Logging.h> #include <Logging.h>
#include <WiFi.h> #include <WiFi.h>
#include <esp_sntp.h> #include <esp_sntp.h>
#include "CrossPointSettings.h"
#include "MappedInputManager.h" #include "MappedInputManager.h"
#include "activities/network/WifiSelectionActivity.h" #include "activities/network/WifiSelectionActivity.h"
#include "components/UITheme.h" #include "components/UITheme.h"