disabled tos mode for serial output (appears to be broken) + log
messages with only printable characters
This commit is contained in:
parent
eab795c14c
commit
6cb60b3a34
|
@ -322,10 +322,12 @@ public abstract class SerialUI extends Log implements SerialPort {
|
||||||
} else {
|
} else {
|
||||||
if (data == 0x7e) {
|
if (data == 0x7e) {
|
||||||
tosChars++;
|
tosChars++;
|
||||||
|
totalTOSChars = 0; /* XXX Disabled TOS mode due to error */
|
||||||
totalTOSChars++;
|
totalTOSChars++;
|
||||||
if (tosChars == 2) {
|
if (tosChars == 2) {
|
||||||
if (totalTOSChars > slipCounter) {
|
if (totalTOSChars > slipCounter) {
|
||||||
tosMode = true;
|
tosMode = true;
|
||||||
|
tosMode = false; /* XXX Disabled TOS mode due to error */
|
||||||
/* already read one char here */
|
/* already read one char here */
|
||||||
tosPos = 1;
|
tosPos = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -337,6 +339,7 @@ public abstract class SerialUI extends Log implements SerialPort {
|
||||||
}
|
}
|
||||||
if (data == '\n') {
|
if (data == '\n') {
|
||||||
lastLogMessage = newMessage.toString();
|
lastLogMessage = newMessage.toString();
|
||||||
|
lastLogMessage = lastLogMessage.replaceAll("[^\\p{Print}]", "");
|
||||||
newMessage.setLength(0);
|
newMessage.setLength(0);
|
||||||
this.setChanged();
|
this.setChanged();
|
||||||
this.notifyObservers(getMote());
|
this.notifyObservers(getMote());
|
||||||
|
|
Loading…
Reference in a new issue