X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosuilib%2FAltosGraph.java;h=880fc8a21c791c7ebc37b6d910c14114a374353e;hb=7600116a191b3ac252a0f716d200d0e0b3500987;hp=e2db9e124b96298c9f2d05842cbc4850084979b9;hpb=c72d83ccd207b5300a90f2e84de6c5c96642478c;p=fw%2Faltos diff --git a/altosuilib/AltosGraph.java b/altosuilib/AltosGraph.java index e2db9e12..880fc8a2 100644 --- a/altosuilib/AltosGraph.java +++ b/altosuilib/AltosGraph.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,14 +16,14 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_3; +package org.altusmetrum.altosuilib_11; import java.io.*; import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altoslib_11.*; import org.jfree.ui.*; import org.jfree.chart.*; @@ -34,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) { @@ -80,29 +58,6 @@ class AltosNsat extends AltosUnits { } } -class AltosPressure 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 "Pa"; - } - - public String say_units(boolean imperial_units) { - return "pascals"; - } - - public int show_fraction(int width, boolean imperial_units) { - return 0; - } -} - class AltosDbm extends AltosUnits { public double value(double d, boolean imperial_units) { @@ -126,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) { @@ -235,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();