Set telegps USB id to 0025
[fw/altos] / altosuilib / AltosUISeries.java
index 26679471a0ff39b80c24fb412464f2a62b92ed68..ac09a3cc04c9b6541eb3d95e18684c0d7bca3013 100644 (file)
@@ -65,7 +65,10 @@ public class AltosUISeries extends XYSeries implements AltosUIGrapher {
        }
 
        public void add(AltosUIDataPoint dataPoint) {
-               super.add(dataPoint.x(), dataPoint.y(fetch));
+               try {
+                       super.add(dataPoint.x(), units.value(dataPoint.y(fetch)));
+               } catch (AltosUIDataMissing dm) {
+               }
        }
 
        public AltosUISeries (String label, int fetch, AltosUnits units, Color color,
@@ -82,18 +85,7 @@ public class AltosUISeries extends XYSeries implements AltosUIGrapher {
 
                renderer = new XYLineAndShapeRenderer(true, false);
                renderer.setSeriesPaint(0, color);
+               renderer.setSeriesVisible(0, enable);
                set_units();
        }
-
-       public AltosUISeries (String label, int fetch, AltosUnits units, Color color, boolean enable) {
-               this(label, fetch, units, color,
-                    enable,
-                    new AltosUIAxis(label, units, color));
-       }
-
-       public AltosUISeries (String label, int fetch, AltosUnits units, Color color) {
-               this(label, fetch, units, color,
-                    true,
-                    new AltosUIAxis(label, units, color));
-       }
 }