mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
feat(l1): clock page and lock screen in the splash lettering
The Home clock page draws HH:MM in the boot splash's slanted digits, with a seconds bar, a centred date and the clock fields as columns. The lock screen keeps the status bar, puts the big clock under it and shows unread messages in a pill; the unlock hint appears for a few seconds after a key press on the lit screen (not the waking one). Settings > Display > Lock clock adds a compact look: a small clock with the date beside it and the clock fields as rows (NodePrefs lock_compact, schema 0xC0DE0033). 12-hour time sets AM / PM beside the digits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
// The MeshCore wordmark and its lettering, shared by both boot splashes
|
||||
// (ui-new/UITask.cpp on the OLED/e-ink boards, ui-lvgl/Splash.h on the L2):
|
||||
// (ui-new/UITask.cpp on the OLED/e-ink boards, ui-lvgl/Splash.h on the L2)
|
||||
// and ui-new's big clock (Home clock page, lock screen):
|
||||
// the 128x13 wordmark bitmap, its own letters, the extra characters drawn in
|
||||
// the same strokes (digits, '.', '-', v, l, d, space), and the Solo version /
|
||||
// the same strokes (digits, '.', ':', '-', v, l, d, space), and the Solo version /
|
||||
// build date strings both splashes show. Platform-free: callers plot pixels.
|
||||
|
||||
#include <stdint.h>
|
||||
@@ -55,6 +56,7 @@ static const PixGlyph GLYPHS[] = {
|
||||
{ '8', { F10, F10, F10, B10, B10, F10, F10, F10, B10, B10, F10, F10, F10 } },
|
||||
{ '9', { F10, F10, F10, B10, B10, F10, F10, F10, R10, R10, F10, F10, F10 } },
|
||||
{ '.', { "....", "....", "....", "....", "....", "....", "....", "....", "....", "....", "###.", "###.", "###." } },
|
||||
{ ':', { "....", "....", "....", "###.", "###.", "###.", "....", "....", "....", "###.", "###.", "###.", "...." } },
|
||||
{ '-', { ".......", ".......", ".......", ".......", ".......", "#######", "#######", "#######",
|
||||
".......", ".......", ".......", ".......", "......." } },
|
||||
{ 'v', { "###.....###", "###.....###", "###.....###", "###.....###", "###.....###", "###.....###", "###.....###",
|
||||
|
||||
@@ -131,6 +131,7 @@ static void optBattDisplay(uint8_t v, char* b, int n, const NodePrefs&) {
|
||||
static const char* L[] = { "Icon", "Percent", "Voltage" };
|
||||
snprintf(b, n, "%s", L[v < 3 ? v : 0]);
|
||||
}
|
||||
static void optLockLook(uint8_t v, char* b, int n, const NodePrefs&) { snprintf(b, n, "%s", v ? "Compact" : "Big"); }
|
||||
static void optExpiry(uint8_t v, char* b, int n, const NodePrefs&) {
|
||||
snprintf(b, n, "%s", NodePrefs::contactExpiryLabel(v));
|
||||
}
|
||||
@@ -197,6 +198,7 @@ static const Setting ALL[] = {
|
||||
MAP("Wake on message", "Screen on for new messages", SEC_DISPLAY, msg_wake_screen_off, INVERTED,
|
||||
nullptr, nullptr),
|
||||
SW("Lock screen", "Slide to unlock after sleep", SEC_DISPLAY, auto_lock, nullptr),
|
||||
IDX("Lock clock", "Big, or compact with the clock fields", SEC_DISPLAY, lock_compact, 2, optLockLook, nullptr),
|
||||
IDX("Battery display", "In the status bar", SEC_DISPLAY, batt_display_mode, 3, optBattDisplay, nullptr),
|
||||
|
||||
MAP("Battery shutdown", "Power off below this voltage", SEC_POWER, low_batt_mv, LOW_BATT, optLowBatt, nullptr),
|
||||
|
||||
Reference in New Issue
Block a user