|
@@ -387,9 +387,15 @@ inline void process_stream_char(const char c, uint8_t &sis, char (&buff)[MAX_CMD
|
387
|
387
|
}
|
388
|
388
|
#endif
|
389
|
389
|
|
390
|
|
- buff[ind++] = c;
|
391
|
|
- if (ind >= MAX_CMD_SIZE - 1)
|
392
|
|
- sis = PS_EOL; // Skip the rest on overflow
|
|
390
|
+ // Backspace erases previous characters
|
|
391
|
+ if (c == 0x08) {
|
|
392
|
+ if (ind) buff[--ind] = '\0';
|
|
393
|
+ }
|
|
394
|
+ else {
|
|
395
|
+ buff[ind++] = c;
|
|
396
|
+ if (ind >= MAX_CMD_SIZE - 1)
|
|
397
|
+ sis = PS_EOL; // Skip the rest on overflow
|
|
398
|
+ }
|
393
|
399
|
}
|
394
|
400
|
|
395
|
401
|
/**
|