mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-19 18:40:17 +00:00
Merge pull request #469 from eberlin/cooja-tab-char
Fix: preserving blank characters (tabulator and space) in Cooja serial output
This commit is contained in:
commit
c99a76747c
@ -102,7 +102,7 @@ public abstract class SerialUI extends Log implements SerialPort {
|
||||
if (data == '\n') {
|
||||
/* Notify observers of new log */
|
||||
lastLogMessage = newMessage.toString();
|
||||
lastLogMessage = lastLogMessage.replaceAll("[^\\p{Print}]", "");
|
||||
lastLogMessage = lastLogMessage.replaceAll("[^\\p{Print}\\p{Blank}]", "");
|
||||
newMessage.setLength(0);
|
||||
this.setChanged();
|
||||
this.notifyObservers(getMote());
|
||||
@ -111,7 +111,7 @@ public abstract class SerialUI extends Log implements SerialPort {
|
||||
if (newMessage.length() > MAX_LENGTH) {
|
||||
/*logger.warn("Dropping too large log message (>" + MAX_LENGTH + " bytes).");*/
|
||||
lastLogMessage = "# [1024 bytes, no line ending]: " + newMessage.substring(0, 20) + "...";
|
||||
lastLogMessage = lastLogMessage.replaceAll("[^\\p{Print}]", "");
|
||||
lastLogMessage = lastLogMessage.replaceAll("[^\\p{Print}\\p{Blank}]", "");
|
||||
newMessage.setLength(0);
|
||||
this.setChanged();
|
||||
this.notifyObservers(getMote());
|
||||
|
Loading…
Reference in New Issue
Block a user