diff options
author | Keith Packard <keithp@keithp.com> | 2017-05-11 17:16:56 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-05-19 21:41:40 -0700 |
commit | 96de483d745ea0ef95326de2847a2534f7057846 (patch) | |
tree | aaff2e6b481b9b602d2dff6fb8a02daed19c0c64 /altosuilib/AltosGraph.java | |
parent | 258808d296aeadaf150fa9b07e9c99a6bf1ca7c8 (diff) |
altosuilib: Start creating new graph interface that takes time series data
Replace the AltosState interface so the graph can get better data, and
can be used for more stuff.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib/AltosGraph.java')
-rw-r--r-- | altosuilib/AltosGraph.java | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/altosuilib/AltosGraph.java b/altosuilib/AltosGraph.java index 2dbd1612..880fc8a2 100644 --- a/altosuilib/AltosGraph.java +++ b/altosuilib/AltosGraph.java @@ -35,29 +35,6 @@ import org.jfree.chart.labels.*; import org.jfree.data.xy.*; import org.jfree.data.*; -class AltosVoltage extends AltosUnits { - - public double value(double v, boolean imperial_units) { - return v; - } - - public double inverse(double v, boolean imperial_units) { - return v; - } - - public String show_units(boolean imperial_units) { - return "V"; - } - - public String say_units(boolean imperial_units) { - return "volts"; - } - - public int show_fraction(int width, boolean imperial_units) { - return width / 2; - } -} - class AltosNsat extends AltosUnits { public double value(double v, boolean imperial_units) { @@ -104,29 +81,6 @@ class AltosDbm extends AltosUnits { } } -class AltosGyroUnits extends AltosUnits { - - public double value(double p, boolean imperial_units) { - return p; - } - - public double inverse(double p, boolean imperial_units) { - return p; - } - - public String show_units(boolean imperial_units) { - return "°/sec"; - } - - public String say_units(boolean imperial_units) { - return "degrees per second"; - } - - public int show_fraction(int width, boolean imperial_units) { - return 1; - } -} - class AltosMagUnits extends AltosUnits { public double value(double p, boolean imperial_units) { @@ -213,7 +167,7 @@ public class AltosGraph extends AltosUIGraph { static AltosPressure pressure_units = new AltosPressure(); static AltosNsat nsat_units = new AltosNsat(); static AltosDbm dbm_units = new AltosDbm(); - static AltosGyroUnits gyro_units = new AltosGyroUnits(); + static AltosRotationRate gyro_units = new AltosRotationRate(); static AltosOrient orient_units = new AltosOrient(); static AltosMagUnits mag_units = new AltosMagUnits(); static AltosDopUnits dop_units = new AltosDopUnits(); |