mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
chore(ui-lvgl): comments name the real Settings pages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
// Device-level pieces from ui-new's Settings > System and Home:
|
// Device-level pieces from ui-new's Settings > System and Home:
|
||||||
// - node name (Settings > Node), reboot / power off (Settings > System);
|
// - node name (Settings > System > Name), reboot / power off (Settings > System);
|
||||||
// - lock screen (Settings > Display & power > Lock screen, NodePrefs::auto_lock):
|
// - lock screen (Settings > Display > Lock screen, NodePrefs::auto_lock):
|
||||||
// once the screen turns off, waking shows a clock card and nothing reacts
|
// once the screen turns off, waking shows a clock card and nothing reacts
|
||||||
// until "slide to unlock" -- against touches in a pocket; with a screen PIN
|
// until "slide to unlock" -- against touches in a pocket; with a screen PIN
|
||||||
// (NodePrefs, ui-core/ScreenLock.h) the card always comes up, also after a reboot, and
|
// (NodePrefs, ui-core/ScreenLock.h) the card always comes up, also after a reboot, and
|
||||||
@@ -332,7 +332,7 @@ void UITask::pinKey(const char* key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Settings > Display & power > Screen PIN: a new PIN typed twice; with one
|
// Settings > Display > Screen PIN: a new PIN typed twice; with one
|
||||||
// set, "Remove" in the header too.
|
// set, "Remove" in the header too.
|
||||||
void UITask::pinSetupPopup() {
|
void UITask::pinSetupPopup() {
|
||||||
using namespace devview;
|
using namespace devview;
|
||||||
@@ -387,7 +387,7 @@ void UITask::pinRemove() {
|
|||||||
pinRowRefresh();
|
pinRowRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display & power rebuilt for the Screen PIN row, still at its bottom.
|
// Settings > Display rebuilt for the Screen PIN row, still at its bottom.
|
||||||
void UITask::pinRowRefresh() {
|
void UITask::pinRowRefresh() {
|
||||||
if (_screen != SCR_SETTINGS_NAV) return;
|
if (_screen != SCR_SETTINGS_NAV) return;
|
||||||
buildSchemaSettings();
|
buildSchemaSettings();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
// Settings > Diagnostics -- ui-new's Tools > Diagnostics. Tabs Live / System /
|
// Home > Diagnostics -- ui-new's Tools > Diagnostics. Tabs Live / System /
|
||||||
// Font / Noise; the rows come from ui-core/Diagnostics.h. Live refreshes every second
|
// Font / Noise; the rows come from ui-core/Diagnostics.h. Live refreshes every second
|
||||||
// and its header button resets the counters (after a confirm).
|
// and its header button resets the counters (after a confirm).
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
// Home > GPS (also Settings > System > GPS details): what the receiver sees.
|
// Home > GPS (also Settings > Connections > GPS): what the receiver sees.
|
||||||
// A sky plot of the satellites in view (centre = overhead, rings at 30 and 60
|
// A sky plot of the satellites in view (centre = overhead, rings at 30 and 60
|
||||||
// degrees elevation, filled = used in the fix, colour = signal), the fix
|
// degrees elevation, filled = used in the fix, colour = signal), the fix
|
||||||
// state with time to first fix and the dilutions of precision, and a bar per
|
// state with time to first fix and the dilutions of precision, and a bar per
|
||||||
|
|||||||
@@ -876,9 +876,9 @@ static void setTrailsOn(bool on) { nvs::putBool("mc_ui", "trails", on); }
|
|||||||
static bool vectorOn() { return nvs::getBool("mc_ui", "vector", false); }
|
static bool vectorOn() { return nvs::getBool("mc_ui", "vector", false); }
|
||||||
static void setVectorOn(bool on) { nvs::putBool("mc_ui", "vector", on); }
|
static void setVectorOn(bool on) { nvs::putBool("mc_ui", "vector", on); }
|
||||||
|
|
||||||
// Screen-lock PIN (Settings > Display & power > Screen PIN): digits, "" = none.
|
// Screen-lock PIN (Settings > Display > Screen PIN): digits, "" = none.
|
||||||
|
|
||||||
// Accent colour (Settings > Display & power): an index into theme::ACCENTS.
|
// Accent colour (Settings > Display): an index into theme::ACCENTS.
|
||||||
static int loadAccent() { return nvs::getU8("mc_ui", "accent", 0); }
|
static int loadAccent() { return nvs::getU8("mc_ui", "accent", 0); }
|
||||||
static void saveAccent(int idx) { nvs::putU8("mc_ui", "accent", idx); }
|
static void saveAccent(int idx) { nvs::putU8("mc_ui", "accent", idx); }
|
||||||
// Settings > Storage > Kept per conversation (an index into histstore::KEEP).
|
// Settings > Storage > Kept per conversation (an index into histstore::KEEP).
|
||||||
@@ -887,7 +887,7 @@ static void saveHistKeep(int idx) { nvs::putI8("mc_ui", "hkeep", idx); }
|
|||||||
// Settings > Storage > Live map tiles: index into mapview::LIVE_CAP_MB, -1 = default.
|
// Settings > Storage > Live map tiles: index into mapview::LIVE_CAP_MB, -1 = default.
|
||||||
static int loadLiveCap() { return nvs::getI8("mc_ui", "ltcap", -1); }
|
static int loadLiveCap() { return nvs::getI8("mc_ui", "ltcap", -1); }
|
||||||
static void saveLiveCap(int idx) { nvs::putI8("mc_ui", "ltcap", idx); }
|
static void saveLiveCap(int idx) { nvs::putI8("mc_ui", "ltcap", idx); }
|
||||||
// Settings > Display & power > Tap to wake: a touch turns the dark screen on
|
// Settings > Display > Tap to wake: a touch turns the dark screen on
|
||||||
// (off: only the top button does).
|
// (off: only the top button does).
|
||||||
static bool loadTapWake() { return nvs::getBool("mc_ui", "tapwake", true); }
|
static bool loadTapWake() { return nvs::getBool("mc_ui", "tapwake", true); }
|
||||||
static void saveTapWake(bool on) { nvs::putBool("mc_ui", "tapwake", on); }
|
static void saveTapWake(bool on) { nvs::putBool("mc_ui", "tapwake", on); }
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ static lv_obj_t* s_target_ring = nullptr;
|
|||||||
static lv_obj_t* s_target_dot = nullptr;
|
static lv_obj_t* s_target_dot = nullptr;
|
||||||
static const int RING_D = 30; // clear of a 12 px marker dot inside it
|
static const int RING_D = 30; // clear of a 12 px marker dot inside it
|
||||||
static navview::EtaTracker s_eta;
|
static navview::EtaTracker s_eta;
|
||||||
static GpsAverager s_avg; // "mark here" with Settings > Waypoint averaging
|
static GpsAverager s_avg; // "mark here" with Settings > Map > Waypoint averaging
|
||||||
static TrackBack s_tb; // walking the trail back: its breadcrumb is the target
|
static TrackBack s_tb; // walking the trail back: its breadcrumb is the target
|
||||||
static const uint32_t TRAIL_COLOR = 0x4FA3FF;
|
static const uint32_t TRAIL_COLOR = 0x4FA3FF;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Quick messages and placeholders (the compose bar's "+", Settings > Messages
|
// Quick messages and placeholders (the compose bar's "+", Settings > Messages
|
||||||
// & contacts > Quick messages), Settings > Send advert and > Bluetooth, and
|
// & contacts > Quick messages), the advert button in Nodes' header, Settings > Bluetooth, and
|
||||||
// Messages' "Read all". The text side is ui-core/MessageText.h.
|
// Messages' "Read all". The text side is ui-core/MessageText.h.
|
||||||
// Included by UITask.cpp (single translation unit).
|
// Included by UITask.cpp (single translation unit).
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// Design tokens for ui-lvgl -- the one place colours, spacing and type live --
|
// Design tokens for ui-lvgl -- the one place colours, spacing and type live --
|
||||||
// and the rules every widget follows (install() below).
|
// and the rules every widget follows (install() below).
|
||||||
//
|
//
|
||||||
// The accent (amber by default; Settings > Display & power > Accent colour)
|
// The accent (amber by default; Settings > Display > Accent colour)
|
||||||
// on near-black, soft corners. The accent means one of three things:
|
// on near-black, soft corners. The accent means one of three things:
|
||||||
// - ACCENT fill, dark text: the primary action of a screen or popup
|
// - ACCENT fill, dark text: the primary action of a screen or popup
|
||||||
// (Download, Install, Save, Go) -- stylePrimary() in UITask.cpp;
|
// (Download, Install, Save, Go) -- stylePrimary() in UITask.cpp;
|
||||||
|
|||||||
@@ -792,7 +792,7 @@ static bool localTime(const NodePrefs* p, struct tm& out, uint32_t utc = rtc_clo
|
|||||||
static const char* const MONTHS[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
static const char* const MONTHS[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||||||
// "14:05", or "2:05" (+ " PM" with suffix) with Settings > 12-hour clock;
|
// "14:05", or "2:05" (+ " PM" with suffix) with Settings > 12-hour clock;
|
||||||
// with `seconds`, ":09" follows unless Settings > Clock seconds is off.
|
// with `seconds`, ":09" follows unless Settings > Time > Clock seconds is off.
|
||||||
static void fmtClock(char* b, size_t n, const struct tm& ti, const NodePrefs* p, bool suffix, bool seconds = false) {
|
static void fmtClock(char* b, size_t n, const struct tm& ti, const NodePrefs* p, bool suffix, bool seconds = false) {
|
||||||
char sec[4] = "";
|
char sec[4] = "";
|
||||||
if (seconds && p && !p->clock_hide_seconds) snprintf(sec, sizeof(sec), ":%02d", ti.tm_sec);
|
if (seconds && p && !p->clock_hide_seconds) snprintf(sec, sizeof(sec), ":%02d", ti.tm_sec);
|
||||||
@@ -1172,7 +1172,7 @@ void UITask::shutdown(bool restart) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Settings > Display & power > Battery shutdown (NodePrefs::low_batt_mv), as
|
// Settings > Power > Battery shutdown (NodePrefs::low_batt_mv), as
|
||||||
// ui-new does it: a smoothed reading every 8 s, never while on USB power.
|
// ui-new does it: a smoothed reading every 8 s, never while on USB power.
|
||||||
void UITask::checkLowBattery() {
|
void UITask::checkLowBattery() {
|
||||||
if ((int32_t)(millis() - _next_batt_ms) < 0) return;
|
if ((int32_t)(millis() - _next_batt_ms) < 0) return;
|
||||||
@@ -1240,7 +1240,7 @@ void UITask::drainCoreEvents() {
|
|||||||
if (!_buzzer.isQuiet()) playMelody(ev.flag ? soundctl::MEL_ARRIVE : soundctl::MEL_LEAVE);
|
if (!_buzzer.isQuiet()) playMelody(ev.flag ? soundctl::MEL_ARRIVE : soundctl::MEL_LEAVE);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case UiEventType::LocatorBeep: // Settings > Proximity beeper
|
case UiEventType::LocatorBeep: // Settings > Map > Proximity beeper
|
||||||
playMelody(soundctl::MEL_TICK);
|
playMelody(soundctl::MEL_TICK);
|
||||||
break;
|
break;
|
||||||
case UiEventType::AdvertHeard:
|
case UiEventType::AdvertHeard:
|
||||||
@@ -1453,7 +1453,7 @@ void UITask::refreshStatusBar() {
|
|||||||
setText(_status_time, "--:--");
|
setText(_status_time, "--:--");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Battery: the icon, then % or volts per Settings > Battery display. The
|
// Battery: the icon, then % or volts per Settings > Power > Battery display. The
|
||||||
// smoothed reading (checkLowBattery): an ADC read blocks the loop for 10 ms.
|
// smoothed reading (checkLowBattery): an ADC read blocks the loop for 10 ms.
|
||||||
uint16_t mv = _batt_mv ? _batt_mv : getBattMilliVolts();
|
uint16_t mv = _batt_mv ? _batt_mv : getBattMilliVolts();
|
||||||
int pct = battery::percent(mv, _prefs ? _prefs->low_batt_mv : 0);
|
int pct = battery::percent(mv, _prefs ? _prefs->low_batt_mv : 0);
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ public:
|
|||||||
void showScopes();
|
void showScopes();
|
||||||
void scopeMenu(int idx);
|
void scopeMenu(int idx);
|
||||||
void scopeAction(uint8_t act);
|
void scopeAction(uint8_t act);
|
||||||
// Settings > Repeater (RepeaterScreen.h)
|
// Home > Repeater (RepeaterScreen.h)
|
||||||
void showRepeater();
|
void showRepeater();
|
||||||
void repeaterSet(int which, int v);
|
void repeaterSet(int which, int v);
|
||||||
void repeaterScopesPopup();
|
void repeaterScopesPopup();
|
||||||
@@ -273,11 +273,11 @@ public:
|
|||||||
void usbTap(bool drive); // that popup's buttons
|
void usbTap(bool drive); // that popup's buttons
|
||||||
bool locked() const;
|
bool locked() const;
|
||||||
void pinKey(const char* key); // the lock screen's keypad
|
void pinKey(const char* key); // the lock screen's keypad
|
||||||
void pinSetupPopup(); // Settings > Display & power > Screen PIN
|
void pinSetupPopup(); // Settings > Display > Screen PIN
|
||||||
void pinSetupKey(const char* key);
|
void pinSetupKey(const char* key);
|
||||||
void pinRemove();
|
void pinRemove();
|
||||||
void pinRowRefresh();
|
void pinRowRefresh();
|
||||||
void accentRow(lv_obj_t* body); // Settings > Display & power > Accent colour
|
void accentRow(lv_obj_t* body); // Settings > Display > Accent colour
|
||||||
void setAccent(int idx);
|
void setAccent(int idx);
|
||||||
void showDiag();
|
void showDiag();
|
||||||
void diagTab(int tab);
|
void diagTab(int tab);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// a password. Scan lists nearby networks to pick from; the password field uses
|
// a password. Scan lists nearby networks to pick from; the password field uses
|
||||||
// the same keyboard as compose. Saved through lvport::saveWifi() (NVS on the
|
// the same keyboard as compose. Saved through lvport::saveWifi() (NVS on the
|
||||||
// board). WiFi itself stays off except while a download or scan runs;
|
// board). WiFi itself stays off except while a download or scan runs;
|
||||||
// Settings > CONNECTIVITY's WiFi switch forbids even that.
|
// Settings > Connections' WiFi switch forbids even that.
|
||||||
//
|
//
|
||||||
// Single-TU fragment: included by ui-lvgl/UITask.cpp after MapScreen.h.
|
// Single-TU fragment: included by ui-lvgl/UITask.cpp after MapScreen.h.
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ void UITask::wifiKeyboardHide() {
|
|||||||
if (_body) lv_obj_set_height(_body, lv_obj_get_height(_body) + lv_obj_get_height(_wifi_kb));
|
if (_body) lv_obj_set_height(_body, lv_obj_get_height(_body) + lv_obj_get_height(_wifi_kb));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Settings > CONNECTIVITY > WiFi, as the Bluetooth row: the switch turns it
|
// Settings > Connections > WiFi, as the Bluetooth row: the switch turns it
|
||||||
// on / off, the row opens the network settings.
|
// on / off, the row opens the network settings.
|
||||||
static void wifiRow(lv_obj_t* body) {
|
static void wifiRow(lv_obj_t* body) {
|
||||||
char sub[48];
|
char sub[48];
|
||||||
|
|||||||
Reference in New Issue
Block a user