Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 212:1e370ffcb73d, committed 2018-04-29
- Comitter:
- bwang
- Date:
- Sun Apr 29 03:16:14 2018 +0000
- Parent:
- 211:3193c31cb1b7
- Child:
- 213:2218bab57355
- Commit message:
- backspace (ASCII 0x08, PuTTY Shift+Backspace) also deletes the previous char in the terminal
Changed in this revision
| callbacks.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/callbacks.cpp Sat Apr 28 21:33:05 2018 +0000
+++ b/callbacks.cpp Sun Apr 29 03:16:14 2018 +0000
@@ -11,14 +11,15 @@
void rxCallback() {
while (io.pc->readable()) {
char c = io.pc->getc();
- if (c != 127 && c != '\r' && c != '\t') {
+ if (c != 127 && c != 8 && c != '\r' && c != '\t') {
linebuf[index] = c;
index++;
io.pc->putc(c);
- } else if (c == 127) {
+ } else if (c == 127 || c == 8) {
if (index > 0) {
index--;
- io.pc->putc(c);
+ //BS (8) should delete previous char
+ io.pc->putc(127);
}
} else if (c == '\r') {
linebuf[index] = 0;
--- a/main.cpp Sat Apr 28 21:33:05 2018 +0000
+++ b/main.cpp Sun Apr 29 03:16:14 2018 +0000
@@ -173,7 +173,7 @@
}
int main() {
- dq = new DirectMapper(50.0f, 0.0f);//InterpolatingLutMapper();
+ dq = new DirectMapper(0.0f, 50.0f);//InterpolatingLutMapper();
th = new LimitingThrottleMapper(1500.0f);
BREMSInit(&io, &read, &foc, &control, false);