Unify the shutdown proceedure (#7393)

* Unify the shutdown proceedure

* Don't double save nodeDB on shutdown

* Re-tool button shutdown to better correspond to tones

* Beep then save

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Jonathan Bennett
2025-07-20 18:53:40 -05:00
committed by GitHub
parent 475cfe4af2
commit 36b94cf823
9 changed files with 43 additions and 62 deletions

View File

@@ -107,11 +107,7 @@ int SystemCommandsModule::handleInputEvent(const InputEvent *event)
return true;
// Power control
case INPUT_BROKER_SHUTDOWN:
LOG_ERROR("Shutting Down");
IF_SCREEN(screen->showSimpleBanner("Shutting Down..."));
nodeDB->saveToDisk();
shutdownAtMsec = millis() + DEFAULT_SHUTDOWN_SECONDS * 1000;
// runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
shutdownAtMsec = millis();
return true;
default: