Skip to content

Commit

Permalink
Serial Plotter: Don't try to parse line containing only trimmable cha…
Browse files Browse the repository at this point in the history
…racters
  • Loading branch information
sandeepmistry committed Sep 18, 2019
1 parent b551bf5 commit 8f02375
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/processing/app/SerialPlotter.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ public void message(final String s) {
messageBuffer.delete(0, linebreak + 1);

line = line.trim();
if (line.length() == 0) {
// the line only contained trimmable characters
continue;
}
String[] parts = line.split("[, \t]+");
if(parts.length == 0) {
continue;
Expand Down

0 comments on commit 8f02375

Please sign in to comment.