diff options
| author | Keith Packard <keithp@keithp.com> | 2013-01-02 11:22:11 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-01-02 11:22:11 -0800 | 
| commit | 93d640de65a1ecedfef89c96521c21632f96f372 (patch) | |
| tree | 053f993e7c3099cac31d5bb2ed1e69133204101f /micropeak/MicroGraph.java | |
| parent | 0933f2ed5791cfdc28242cd60be3942556f4ed20 (diff) | |
micropoint: Add MicroDataPoint
This holds height/speed/accel data all in one place
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'micropeak/MicroGraph.java')
| -rw-r--r-- | micropeak/MicroGraph.java | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/micropeak/MicroGraph.java b/micropeak/MicroGraph.java index c5580634..8330a67b 100644 --- a/micropeak/MicroGraph.java +++ b/micropeak/MicroGraph.java @@ -106,11 +106,10 @@ public class MicroGraph implements AltosUnitsListener {  		heightSeries.clear();  		speedSeries.clear();  		accelSeries.clear(); -		for (int i = 0; i < data.pressures.length; i++) { -			double x = data.time(i); -			heightSeries.add(x, AltosConvert.height.value(data.height(i))); -			speedSeries.add(x, AltosConvert.speed.value(data.speed(i))); -			accelSeries.add(x, AltosConvert.accel.value(data.acceleration(i))); +		for (MicroDataPoint point : data.points()) { +			heightSeries.add(point.time, AltosConvert.height.value(point.height)); +			speedSeries.add(point.time, AltosConvert.speed.value(point.speed)); +			accelSeries.add(point.time, AltosConvert.accel.value(point.accel));  		}  	} | 
