diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 9c0e760091..378d6a0615 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -3594,6 +3594,9 @@ static void cliExit(const char *cmdName, char *cmdline) cliMode = false; // incase a motor was left running during motortest, clear it here mixerResetDisarmedMotors(); + if (strcasecmp(cmdline, "noreboot") == 0) { + return; + } cliReboot(); } @@ -4250,6 +4253,9 @@ static void cliSave(const char *cmdName, char *cmdline) writeEEPROM(); cliPrintHashLine("saving"); + if (strcasecmp(cmdline, "noreboot") == 0) { + return; + } cliReboot(); } } @@ -6512,7 +6518,7 @@ const clicmd_t cmdTable[] = { #ifdef USE_ESCSERIAL CLI_COMMAND_DEF("escprog", "passthrough esc to serial", " ", cliEscPassthrough), #endif - CLI_COMMAND_DEF("exit", NULL, NULL, cliExit), + CLI_COMMAND_DEF("exit", "exit command line interface and reboot (default)", "[noreboot]", cliExit), CLI_COMMAND_DEF("feature", "configure features", "list\r\n" "\t<->[name]", cliFeature), @@ -6571,7 +6577,7 @@ const clicmd_t cmdTable[] = { #endif CLI_COMMAND_DEF("rxfail", "show/set rx failsafe settings", NULL, cliRxFailsafe), CLI_COMMAND_DEF("rxrange", "configure rx channel ranges", NULL, cliRxRange), - CLI_COMMAND_DEF("save", "save and reboot", NULL, cliSave), + CLI_COMMAND_DEF("save", "save and reboot (default)", "[noreboot]", cliSave), #ifdef USE_SDCARD CLI_COMMAND_DEF("sd_info", "sdcard info", NULL, cliSdInfo), #endif @@ -6768,7 +6774,7 @@ static void processCharacterInteractive(const char c) void cliProcess(void) { - if (!cliWriter) { + if (!cliWriter || !cliMode) { return; } diff --git a/src/main/msp/msp_serial.c b/src/main/msp/msp_serial.c index be945ea494..9f15c275eb 100644 --- a/src/main/msp/msp_serial.c +++ b/src/main/msp/msp_serial.c @@ -476,6 +476,7 @@ static void mspProcessPendingRequest(mspPort_t * mspPort) #endif #ifdef USE_CLI case MSP_PENDING_CLI: + mspPort->pendingRequest = MSP_PENDING_NONE; cliEnter(mspPort->port); break; #endif