Commit 90d94b88 authored by Eric Duminil's avatar Eric Duminil
Browse files

Allow backspace in console

parent b912c9e4
Pipeline #2825 passed with stage
in 1 minute and 41 seconds
......@@ -92,10 +92,16 @@ namespace sensor_commands {
break;
case '\r': // discard carriage return
break;
case '\b': // backspace
if (input_pos > 0) {
input_pos--;
}
break;
default:
// keep adding if not full ... allow for terminating null byte
if (input_pos < (MAX_COMMAND_SIZE - 1))
if (input_pos < (MAX_COMMAND_SIZE - 1)) {
input_line[input_pos++] = input_byte;
}
break;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment