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.
Diff: callbacks.cpp
- Revision:
- 249:314c1b12d9c2
- Parent:
- 247:da647f7185b7
- Child:
- 250:ef028cbd0749
--- a/callbacks.cpp Tue Nov 13 16:21:06 2018 +0000
+++ b/callbacks.cpp Tue Nov 13 17:23:50 2018 +0000
@@ -14,7 +14,7 @@
if (c != 127 && c != 8 && c != '\r' && c != '\t') {
linebuf[index] = c;
if (index < 127) index++;
- io.pc->putc(c);
+ if (c < 128) io.pc->putc(c);
} else if (c == 127 || c == 8) {
if (index > 0) {
index--;
@@ -23,13 +23,14 @@
}
} else if (c == '\r') {
linebuf[index] = 0;
- io.pc->putc(c);
- if (!io.cmd_busy) {
- if (linebuf[0] > 127) processCmdFast(io.pc, io.pref, linebuf);
- else processCmd(io.pc, io.pref, linebuf);
+ if (!io.cmd_busy && linebuf[0] > 127) {
+ processCmdFast(io.pc, io.pref, linebuf);
+ } else if (!io.cmd_busy) {
+ processCmd(io.pc, io.pref, linebuf);
+ io.pc->putc(c);
+ io.pc->putc('>');
}
index = 0;
- io.pc->putc('>');
}
}
}