diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-11-10 14:17:32 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-11-10 14:17:32 +1100 |
| commit | 270bce721223f40faffa4f8e62fd9547530cb276 (patch) | |
| tree | 5bdcc2cd49562503d415445007ef6ef7a5c07513 /src/ui | |
| parent | 0419def89b49c3a17991f777f0de08fe6a2ef524 (diff) | |
| download | tangara-fw-270bce721223f40faffa4f8e62fd9547530cb276.tar.gz | |
Fix display off on boot with new lock switch direction
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/ui_fsm.cpp | 6 |
1 files changed, 1 insertions, 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, |
