mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-07-24 04:30:57 +00:00
v1.7.1: GPS time sync, timezone picker, status bar clock
- GPS time sync via UBlox MIA-M10Q (38400 baud auto-detect) - Custom zero-dependency NMEA parser with XOR checksum validation - Only trust GPS time when satellites > 0 (no stale RTC cache) - DST-aware timezone picker at first boot (21 cities, POSIX TZ strings) - Timezone also configurable in Settings > GPS/Time - GPS Time on by default, GPS Location off by default (opt-in) - Status bar: clock (top-left), Ratspeak.org (center), battery (right) - 12h time default (no AM/PM), configurable 24h in settings - NVS persistence of GPS time for approximate timestamps across reboots - Fix factory reset Enter key bleed-through (600ms input guard) - Fix hardcoded UTC-5 NTP timezone (now uses DST-aware POSIX TZ)
This commit is contained in:
@@ -32,13 +32,6 @@ void LvStatusBar::create(lv_obj_t* parent) {
|
||||
lv_label_set_text(_lblBrand, "Ratspeak.org");
|
||||
lv_obj_align(_lblBrand, LV_ALIGN_CENTER, 0, 0);
|
||||
|
||||
// Right: GPS indicator (left of battery, hidden until fix)
|
||||
_lblGPS = lv_label_create(_bar);
|
||||
lv_obj_set_style_text_font(_lblGPS, font, 0);
|
||||
lv_obj_set_style_text_color(_lblGPS, lv_color_hex(Theme::PRIMARY), 0);
|
||||
lv_label_set_text(_lblGPS, "");
|
||||
lv_obj_align(_lblGPS, LV_ALIGN_RIGHT_MID, -42, 0);
|
||||
|
||||
// Right: Battery %
|
||||
_lblBatt = lv_label_create(_bar);
|
||||
lv_obj_set_style_text_font(_lblBatt, font, 0);
|
||||
@@ -104,11 +97,7 @@ void LvStatusBar::updateTime() {
|
||||
}
|
||||
|
||||
void LvStatusBar::setGPSFix(bool hasFix) {
|
||||
if (_gpsFix == hasFix) return;
|
||||
_gpsFix = hasFix;
|
||||
if (_lblGPS) {
|
||||
lv_label_set_text(_lblGPS, hasFix ? "GPS" : "");
|
||||
}
|
||||
}
|
||||
|
||||
void LvStatusBar::setBatteryPercent(int pct) {
|
||||
|
||||
Reference in New Issue
Block a user