From ebcdf939305879c7061d77fe3cc5cbbd14a3853f Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 23 May 2023 09:29:22 +1000 Subject: Re-enable app console --- src/system_fsm/booting.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/system_fsm/booting.cpp') diff --git a/src/system_fsm/booting.cpp b/src/system_fsm/booting.cpp index d9ee6e45..eda7fbd0 100644 --- a/src/system_fsm/booting.cpp +++ b/src/system_fsm/booting.cpp @@ -20,6 +20,8 @@ namespace states { static const char kTag[] = "BOOT"; +console::AppConsole *Booting::sAppConsole; + auto Booting::entry() -> void { ESP_LOGI(kTag, "beginning tangara boot"); ESP_LOGI(kTag, "installing bare minimum drivers"); @@ -73,8 +75,15 @@ auto Booting::entry() -> void { BootComplete()); } +auto Booting::exit() -> void { + // TODO(jacqueline): Gate this on something. Debug flag? Flashing mode? + sAppConsole = new console::AppConsole(sDatabase); + sAppConsole->Launch(); +} + 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->ReadUsbMscStatus() == -- cgit v1.2.3