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:
parent
be01c39c3a
commit
8b5a900ae1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user