|
@@ -310,13 +310,13 @@ void cli_getchar(cli_state_t *s, char incoming_char)
|
|
|
cli_input(s);
|
|
|
s->bufptr = 0;
|
|
|
} else if( s->buf[s->bufptr] == '\b' || s->buf[s->bufptr] == 0x7f) {
|
|
|
- /* Backspace was pressed. Erase the last
|
|
|
- character in the string - if any. */
|
|
|
- s->buf[s->bufptr] = '\0';
|
|
|
- if( s->bufptr > 0 )
|
|
|
- {
|
|
|
+ /* Backspace was pressed. Erase the last character in the string - if any. */
|
|
|
+ s->buf[s->bufptr] = '\0';
|
|
|
+ if (s->bufptr > 0) {
|
|
|
s->bufptr--;
|
|
|
s->buf[s->bufptr] = '\0';
|
|
|
+ const char backspace[] = "\b \b";
|
|
|
+ s->send(s->num_connect, backspace, sizeof(backspace));
|
|
|
}
|
|
|
} else if (s->buf[s->bufptr] == 0x03){
|
|
|
xTimerStop(s->RepeatSensorInfoTimer, 0);
|