From 764b01e913d0123747757e5efd3545d46e921848 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 21 Aug 2023 15:43:23 +1000 Subject: Add idle->standby support when locked and no music --- src/system_fsm/booting.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/system_fsm/booting.cpp') diff --git a/src/system_fsm/booting.cpp b/src/system_fsm/booting.cpp index 6720fb4a..27f2b9c9 100644 --- a/src/system_fsm/booting.cpp +++ b/src/system_fsm/booting.cpp @@ -94,13 +94,11 @@ auto Booting::exit() -> void { auto Booting::react(const BootComplete& ev) -> void { ESP_LOGI(kTag, "bootup completely successfully"); - // It's possible that the SAMD is currently exposing the SD card as a USB - // device. Make sure we don't immediately try to claim it. - if (sSamd && - sSamd->GetUsbStatus() == drivers::Samd::UsbStatus::kAttachedMounted) { - transit(); + if (sGpios->Get(drivers::Gpios::Pin::kKeyLock)) { + transit(); + } else { + transit(); } - transit(); } } // namespace states -- cgit v1.2.3