1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

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

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);