static void cliExit(char *cmdline) { uartPrint("\r\nLeaving CLI mode...\r\n"); memset(cliBuffer, 0, sizeof(cliBuffer)); bufferIndex = 0; cliMode = 0; // save and reboot... I think this makes the most sense cliSave(cmdline); }
static void cliExit(char *cmdline) { cliPrint("\r\nLeaving CLI mode...\r\n"); *cliBuffer = '\0'; bufferIndex = 0; cliMode = 0; // incase some idiot leaves a motor running during motortest, clear it here mixerResetMotors(); // save and reboot... I think this makes the most sense cliSave(cmdline); }
static void cliExit(char *cmdline) { cliPrint("\r\nLeaving CLI mode...\r\n"); *cliBuffer = '\0'; bufferIndex = 0; cliMode = 0; // incase some idiot leaves a motor running during motortest, clear it here mixerResetMotors(); // save and reboot... I think this makes the most sense - otherwise config changes can be out of sync, maybe just need to applyConfig and return? #if 1 cliSave(cmdline); #else releaseSerialPort(cliPort, FUNCTION_CLI); #endif }