Skip to content

Commit

Permalink
Merge branch 'serialplotter' of https://github.com/xloem/Arduino
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Oct 3, 2016
2 parents 0a8e7a1 + 8b5a900 commit bc5c9b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/processing/app/SerialPlotter.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ private Ticks computeBounds() {
minY = Double.POSITIVE_INFINITY;
maxY = Double.NEGATIVE_INFINITY;
for(Graph g : graphs) {
minY = Math.min(g.buffer.min(), minY);
maxY = Math.max(g.buffer.max(), maxY);
if (!g.buffer.isEmpty()) {
minY = Math.min(g.buffer.min(), minY);
maxY = Math.max(g.buffer.max(), maxY);
}
}

final double MIN_DELTA = 10.0;
Expand Down Expand Up @@ -239,7 +241,7 @@ public void message(final String s) {
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);
Expand Down
2 changes: 2 additions & 0 deletions build/shared/revisions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ARDUINO 1.6.13

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

[core]

Expand Down

0 comments on commit bc5c9b8

Please sign in to comment.