From 270bce721223f40faffa4f8e62fd9547530cb276 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 10 Nov 2023 14:17:32 +1100 Subject: [PATCH] Fix display off on boot with new lock switch direction --- src/ui/ui_fsm.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp index a4001efe..8d3fa20d 100644 --- a/src/ui/ui_fsm.cpp +++ b/src/ui/ui_fsm.cpp @@ -72,6 +72,7 @@ auto UiState::InitBootSplash(drivers::IGpios& gpios) -> bool { sCurrentScreen.reset(new screens::Splash()); sTask.reset(UiTask::Start()); + sDisplay->SetDisplayOn(!gpios.Get(drivers::IGpios::Pin::kKeyLock)); return true; } @@ -132,11 +133,6 @@ void UiState::react(const internal::ControlSchemeChanged&) { namespace states { void Splash::exit() { - if (sDisplay != nullptr) { - sDisplay->SetDisplayOn( - sServices->gpios().Get(drivers::IGpios::Pin::kKeyLock)); - } - // buzz a bit to tell the user we're done booting events::System().Dispatch(system_fsm::HapticTrigger{ .effect = drivers::Haptics::Effect::kLongDoubleSharpTick1_100Pct,