mod: add clock settings tab, timezone support, and clock size option

Fix clock persistence bug caused by stale legacy read in settings
deserialization. Add clock size setting (Small/Medium/Large) and
timezone selection with North American presets plus custom UTC offset.
Move all clock-related settings into a dedicated Clock tab, rename
"Home Screen Clock" to "Clock", and move minute-change detection to
main loop so the header clock updates on every screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cottongin
2026-02-17 03:46:06 -05:00
parent 38a87298f3
commit 966fbef3d1
22 changed files with 435 additions and 42 deletions

View File

@@ -5,6 +5,10 @@
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <cstdlib>
#include "CrossPointSettings.h"
namespace TimeSync {
void startNtpSync() {
@@ -12,6 +16,10 @@ void startNtpSync() {
esp_sntp_stop();
}
// Apply timezone so NTP-synced time is displayed correctly
setenv("TZ", SETTINGS.getTimezonePosixStr(), 1);
tzset();
esp_sntp_setoperatingmode(ESP_SNTP_OPMODE_POLL);
esp_sntp_setservername(0, "pool.ntp.org");
esp_sntp_init();