turn off watch when starting new shell session

This commit is contained in:
proddy
2020-06-26 13:03:06 +02:00
parent 4bea741958
commit 8bfa71fb0f

View File

@@ -56,7 +56,7 @@ void EMSESPShell::stopped() {
// remove all custom contexts // remove all custom contexts
commands->remove_all_commands(); commands->remove_all_commands();
_console_commands_loaded = false; // make sure they get reloaded next time a console is opened _console_commands_loaded = false; // make sure they get reloaded next time a console is opened
} }
@@ -88,6 +88,9 @@ void EMSESPShell::display_banner() {
// load the list of commands // load the list of commands
add_console_commands(); add_console_commands();
// turn off watch
emsesp::EMSESP::watch_id(WATCH_ID_NONE);
} }
// pre-loads all the console commands into the MAIN context // pre-loads all the console commands into the MAIN context
@@ -102,7 +105,7 @@ void EMSESPShell::add_console_commands() {
// just in case, remove everything // just in case, remove everything
// commands->remove_context_commands(ShellContext::MAIN); // commands->remove_context_commands(ShellContext::MAIN);
commands->remove_all_commands(); commands->remove_all_commands();
commands->add_command(ShellContext::MAIN, commands->add_command(ShellContext::MAIN,
CommandFlags::USER, CommandFlags::USER,
flash_string_vector{F_(refresh)}, flash_string_vector{F_(refresh)},