summaryrefslogtreecommitdiff
path: root/src/system_fsm/booting.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-05-23 09:29:22 +1000
committerjacqueline <me@jacqueline.id.au>2023-05-23 09:29:22 +1000
commitebcdf939305879c7061d77fe3cc5cbbd14a3853f (patch)
treec42ec15f488c7e59364c9e5c097990845c2d715d /src/system_fsm/booting.cpp
parent4bff06c76c223a156a14adc478ab1a9b083fd7b2 (diff)
downloadtangara-fw-ebcdf939305879c7061d77fe3cc5cbbd14a3853f.tar.gz
Re-enable app console
Diffstat (limited to 'src/system_fsm/booting.cpp')
-rw-r--r--src/system_fsm/booting.cpp9
1 files changed, 9 insertions, 0 deletions
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() ==