Skip to content

Commit bc5c9b8

Browse files
committed
Merge branch 'serialplotter' of https://github.com/xloem/Arduino
2 parents 0a8e7a1 + 8b5a900 commit bc5c9b8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/src/processing/app/SerialPlotter.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ private Ticks computeBounds() {
8787
minY = Double.POSITIVE_INFINITY;
8888
maxY = Double.NEGATIVE_INFINITY;
8989
for(Graph g : graphs) {
90-
minY = Math.min(g.buffer.min(), minY);
91-
maxY = Math.max(g.buffer.max(), maxY);
90+
if (!g.buffer.isEmpty()) {
91+
minY = Math.min(g.buffer.min(), minY);
92+
maxY = Math.max(g.buffer.max(), maxY);
93+
}
9294
}
9395

9496
final double MIN_DELTA = 10.0;
@@ -239,7 +241,7 @@ public void message(final String s) {
239241
for(int i = 0; i < parts.length; ++i) {
240242
try {
241243
double value = Double.valueOf(parts[i]);
242-
if(i >= graphs.size()) {
244+
if(validParts >= graphs.size()) {
243245
graphs.add(new Graph(validParts));
244246
}
245247
graphs.get(validParts).buffer.add(value);

build/shared/revisions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ARDUINO 1.6.13
22

33
[ide]
4+
* Improved robustness of Serial Plotter while dealing with malformed or partial data. Thanks @xloem.
5+
* Fixed regression on command line upload.
46

57
[core]
68

0 commit comments

Comments
 (0)