mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-21 23:44:48 +08:00
add ! as alternative end char, do parsing
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user