summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-11-10 14:17:32 +1100
committerjacqueline <me@jacqueline.id.au>2023-11-10 14:17:32 +1100
commit270bce721223f40faffa4f8e62fd9547530cb276 (patch)
tree5bdcc2cd49562503d415445007ef6ef7a5c07513 /src/ui
parent0419def89b49c3a17991f777f0de08fe6a2ef524 (diff)
downloadtangara-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.cpp6
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,