diff options
Diffstat (limited to 'src/system_fsm/booting.cpp')
| -rw-r--r-- | src/system_fsm/booting.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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<Unmounted>(); + if (sGpios->Get(drivers::Gpios::Pin::kKeyLock)) { + transit<Running>(); + } else { + transit<Idle>(); } - transit<Running>(); } } // namespace states |
