mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
parent
4fa57be5c7
commit
870171a69e
@ -87,12 +87,17 @@ public class SerialPlotter extends AbstractMonitor {
|
||||
minY = Double.POSITIVE_INFINITY;
|
||||
maxY = Double.NEGATIVE_INFINITY;
|
||||
for(Graph g : graphs) {
|
||||
double bMin = g.buffer.min() / 2.0;
|
||||
double bMax = g.buffer.max() * 2.0;
|
||||
minY = bMin < minY ? bMin : minY;
|
||||
maxY = bMax > maxY ? bMax : maxY;
|
||||
minY = Math.min(g.buffer.min(), minY);
|
||||
maxY = Math.max(g.buffer.max(), maxY);
|
||||
}
|
||||
|
||||
|
||||
final double MIN_DELTA = 10.0;
|
||||
if (maxY - minY < MIN_DELTA) {
|
||||
double mid = (maxY + minY) / 2;
|
||||
maxY = mid + MIN_DELTA / 2;
|
||||
minY = mid - MIN_DELTA / 2;
|
||||
}
|
||||
|
||||
Ticks ticks = new Ticks(minY, maxY, 3);
|
||||
minY = Math.min(minY, ticks.getTick(0));
|
||||
maxY = Math.max(maxY, ticks.getTick(ticks.getTickCount() - 1));
|
||||
|
@ -5,6 +5,7 @@ ARDUINO 1.6.8
|
||||
* Fixed incorrect key bindings handling for changing tab. Thanks @matthijskooijman
|
||||
* MacOSX: Fixed handling of add indent/remove indent shortcuts (CMD+[ and CMD+])
|
||||
* Fixed incorrect update of available libraries in Library Manager. Thanks @vicnevicne
|
||||
* Serial plotter now correctly resize graphs with negative values. Thanks @vicnevicne
|
||||
|
||||
[core]
|
||||
* avr: fixed USB_SendControl(...) for buffer with len > 64. Thanks @NicoHood
|
||||
|
Loading…
x
Reference in New Issue
Block a user