feat(display): Bible Verse screensaver + longer idle timeouts

- ScreensaverType::BibleVerse launches one.tactility.bibleverse on
  idle (falls back to black when not installed); tap stops the app
  and returns to launcher; 30-minute backlight auto-off stops it too
- Timeout options extended to 15/30 minutes; auto-off 5m -> 30m
- Screensaver dropdown lists Bible Verse
This commit is contained in:
Adolfo Reyna
2026-09-12 09:03:37 -04:00
parent 85da419a98
commit 054d1286b2
5 changed files with 93 additions and 15 deletions
+9 -5
View File
@@ -135,8 +135,8 @@ void onTimeoutChanged(lv_event_t* event) {
auto* ctx = static_cast<Context*>(lv_event_get_user_data(event));
auto* dropdown = static_cast<lv_obj_t*>(lv_event_get_target(event));
uint32_t idx = lv_dropdown_get_selected(dropdown);
// Map dropdown index to ms: 0=15s,1=30s,2=1m,3=2m,4=5m,5=Never
static const uint32_t values_ms[] = {15000, 30000, 60000, 120000, 300000, 0};
// Map dropdown index to ms: 0=15s,1=30s,2=1m,3=2m,4=5m,5=15m,6=30m,7=Never
static const uint32_t values_ms[] = {15000, 30000, 60000, 120000, 300000, 900000, 1800000, 0};
if (idx < (sizeof(values_ms)/sizeof(values_ms[0]))) {
ctx->displaySettings.backlightTimeoutMs = values_ms[idx];
ctx->displaySettingsUpdated = true;
@@ -353,7 +353,7 @@ void createWidgets(lv_obj_t* parent, void* userData) {
lv_obj_align(timeout_value_label, LV_ALIGN_LEFT_MID, 0, 0);
ctx->timeoutDropdown = lv_dropdown_create(timeout_select_wrapper);
lv_dropdown_set_options(ctx->timeoutDropdown, "15 seconds\n30 seconds\n1 minute\n2 minutes\n5 minutes\nNever");
lv_dropdown_set_options(ctx->timeoutDropdown, "15 seconds\n30 seconds\n1 minute\n2 minutes\n5 minutes\n15 minutes\n30 minutes\nNever");
lv_obj_align(ctx->timeoutDropdown, LV_ALIGN_RIGHT_MID, 0, 0);
lv_obj_add_event_cb(ctx->timeoutDropdown, onTimeoutChanged, LV_EVENT_VALUE_CHANGED, ctx);
// Initialize dropdown selection from settings
@@ -368,8 +368,12 @@ void createWidgets(lv_obj_t* parent, void* userData) {
idx = 3;
else if (ms == 300000)
idx = 4;
else if (ms == 0)
else if (ms == 900000)
idx = 5;
else if (ms == 1800000)
idx = 6;
else if (ms == 0)
idx = 7;
lv_dropdown_set_selected(ctx->timeoutDropdown, idx);
if (!ctx->displaySettings.backlightTimeoutEnabled) {
lv_obj_add_state(ctx->timeoutDropdown, LV_STATE_DISABLED);
@@ -387,7 +391,7 @@ void createWidgets(lv_obj_t* parent, void* userData) {
ctx->screensaverDropdown = lv_dropdown_create(screensaver_wrapper);
// Note: order correlates with settings::display::ScreensaverType enum order
lv_dropdown_set_options(ctx->screensaverDropdown, "None\nBouncing Balls\nMystify\nMatrix Rain\nStackChan\nMCP Screen");
lv_dropdown_set_options(ctx->screensaverDropdown, "None\nBouncing Balls\nMystify\nMatrix Rain\nStackChan\nMCP Screen\nBible Verse");
lv_obj_align(ctx->screensaverDropdown, LV_ALIGN_RIGHT_MID, 0, 0);
lv_obj_add_event_cb(ctx->screensaverDropdown, onScreensaverChanged, LV_EVENT_VALUE_CHANGED, ctx);
lv_dropdown_set_selected(ctx->screensaverDropdown, static_cast<uint16_t>(ctx->displaySettings.screensaverType));