add ! as alternative end char, do parsing

This commit is contained in:
Oskar Weigl
2017-09-23 21:10:48 -07:00
parent 9abec8af00
commit 57273d04d4
+2 -2
View File
@@ -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;