Message parsing logic fix

comparison was invalid if some parts were not parsable numbers
This commit is contained in:
xloem 2016-09-30 17:04:01 -04:00 committed by GitHub
parent be01c39c3a
commit 8b5a900ae1
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ public class SerialPlotter extends AbstractMonitor {
for(int i = 0; i < parts.length; ++i) {
try {
double value = Double.valueOf(parts[i]);
if(i >= graphs.size()) {
if(validParts >= graphs.size()) {
graphs.add(new Graph(validParts));
}
graphs.get(validParts).buffer.add(value);