diff --git a/Src/freertos.c b/Src/freertos.c index 41094c23..630b5a2c 100644 --- a/Src/freertos.c +++ b/Src/freertos.c @@ -189,10 +189,10 @@ void usb_cmd_thread(void const * argument) { // Record into parse buffer when actively reading if (read_active) { parse_buffer[parse_buffer_idx++] = c; - if (c == '\r' || c == '\n') { + if (c == '\r' || c == '\n' || c == "!") { // End of command string: exchange end char with terminating null parse_buffer[parse_buffer_idx-1] = '\0'; - osDelay(1); + motor_parse_cmd(parse_buffer, parse_buffer_idx); // Reset receieve state machine reset_read_state = true; break;