mirror of https://github.com/noisymime/Arduino.git
Merge branch 'serialplotter' of https://github.com/xloem/Arduino
This commit is contained in:
commit
bc5c9b8b7e
|
@ -87,9 +87,11 @@ public class SerialPlotter extends AbstractMonitor {
|
||||||
minY = Double.POSITIVE_INFINITY;
|
minY = Double.POSITIVE_INFINITY;
|
||||||
maxY = Double.NEGATIVE_INFINITY;
|
maxY = Double.NEGATIVE_INFINITY;
|
||||||
for(Graph g : graphs) {
|
for(Graph g : graphs) {
|
||||||
|
if (!g.buffer.isEmpty()) {
|
||||||
minY = Math.min(g.buffer.min(), minY);
|
minY = Math.min(g.buffer.min(), minY);
|
||||||
maxY = Math.max(g.buffer.max(), maxY);
|
maxY = Math.max(g.buffer.max(), maxY);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final double MIN_DELTA = 10.0;
|
final double MIN_DELTA = 10.0;
|
||||||
if (maxY - minY < MIN_DELTA) {
|
if (maxY - minY < MIN_DELTA) {
|
||||||
|
@ -239,7 +241,7 @@ public class SerialPlotter extends AbstractMonitor {
|
||||||
for(int i = 0; i < parts.length; ++i) {
|
for(int i = 0; i < parts.length; ++i) {
|
||||||
try {
|
try {
|
||||||
double value = Double.valueOf(parts[i]);
|
double value = Double.valueOf(parts[i]);
|
||||||
if(i >= graphs.size()) {
|
if(validParts >= graphs.size()) {
|
||||||
graphs.add(new Graph(validParts));
|
graphs.add(new Graph(validParts));
|
||||||
}
|
}
|
||||||
graphs.get(validParts).buffer.add(value);
|
graphs.get(validParts).buffer.add(value);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
ARDUINO 1.6.13
|
ARDUINO 1.6.13
|
||||||
|
|
||||||
[ide]
|
[ide]
|
||||||
|
* Improved robustness of Serial Plotter while dealing with malformed or partial data. Thanks @xloem.
|
||||||
|
* Fixed regression on command line upload.
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue