altosui: comment out un-used fields and methods
authorMike Beattie <mike@ethernal.org>
Fri, 14 Sep 2012 01:13:35 +0000 (13:13 +1200)
committerMike Beattie <mike@ethernal.org>
Fri, 14 Sep 2012 01:13:35 +0000 (13:13 +1200)
Signed-off-by: Mike Beattie <mike@ethernal.org>
altosui/AltosBTDevice.java
altosui/AltosConfigUI.java
altosui/AltosDisplayThread.java
altosui/AltosEepromManage.java
altosui/AltosEepromSelect.java
altosui/AltosFlashUI.java
altosui/AltosGraphUI.java
altosui/AltosInfoTable.java
altosui/AltosSiteMap.java
altosui/AltosSiteMapPreload.java
altosui/AltosUI.java

index 0866ccc8e982b2b7ec55173c62fcfeab358d4239..03e7cbeca929c97e4030b76c0346df4bd99f6b3d 100644 (file)
@@ -77,11 +77,13 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice {
                return libaltos.altos_bt_open(this);
        }
 
+       /*
        private boolean isAltusMetrum() {
                if (getName().startsWith(Altos.bt_product_telebt))
                        return true;
                return false;
        }
+       */
 
        public boolean matchProduct(int want_product) {
 
index 8a8f2c0eef738affbc3f9ba838c0cf4835feaa56..dd34a9cf348c84dbbb4a219652527f2e0db0c5a8 100644 (file)
@@ -741,12 +741,12 @@ public class AltosConfigUI
        }
 
        public void set_flight_log_max_limit(int flight_log_max_limit) {
-               boolean any_added = false;
+               //boolean       any_added = false;
                flight_log_max_value.removeAllItems();
                for (int i = 0; i < flight_log_max_values.length; i++) {
                        if (Integer.parseInt(flight_log_max_values[i]) < flight_log_max_limit){
                                flight_log_max_value.addItem(flight_log_max_values[i]);
-                               any_added = true;
+                               //any_added = true;
                        }
                }
                flight_log_max_value.addItem(String.format("%d", flight_log_max_limit));
index 299070c9716a9e346f5e2379b1176b74735e5078..f7a1d03eb2ad7b1bfa0f9e8f6d6bc667eef23ddc 100644 (file)
@@ -222,7 +222,7 @@ public class AltosDisplayThread extends Thread {
 
        public void run() {
                boolean         interrupted = false;
-               String          line;
+               //String                line;
                AltosState      state = null;
                AltosState      old_state = null;
                boolean         told;
index e6739e770eb0f55e572d3876a174e8d11e82a13e..b8de77dabbc93721437defb51cbe24cc545d101e 100644 (file)
@@ -153,7 +153,7 @@ public class AltosEepromManage implements ActionListener {
                                                      ee.getLocalizedMessage(),
                                                      JOptionPane.ERROR_MESSAGE);
                } else if (e instanceof TimeoutException) {
-                       TimeoutException te = (TimeoutException) e;
+                       //TimeoutException te = (TimeoutException) e;
                        JOptionPane.showMessageDialog(frame,
                                                      String.format("Communications failed with \"%s\"",
                                                                    device.toShortString()),
@@ -194,7 +194,7 @@ public class AltosEepromManage implements ActionListener {
 
        public AltosEepromManage(JFrame given_frame) {
 
-               boolean running = false;
+               //boolean       running = false;
 
                frame = given_frame;
                device = AltosDeviceDialog.show(frame, Altos.product_any);
index dcdfcc3ea1619fdb7e796c14c549511acb12ec67..d8b8693d8762f22f4b43232edf440df5c381f661 100644 (file)
@@ -51,7 +51,7 @@ class AltosEepromItem implements ActionListener {
 }
 
 public class AltosEepromSelect extends AltosDialog implements ActionListener {
-       private JList                   list;
+       //private JList                 list;
        private JFrame                  frame;
        JButton                         ok;
        JButton                         cancel;
index 3ccfa76c3f74334c39f6bd34b5ead0b6799935e3..f8c24b16c662a2498cb6b4570f087461f9c198f5 100644 (file)
@@ -286,7 +286,7 @@ public class AltosFlashUI
                if (!select_source_file())
                        return;
                build_dialog();
-               flash_task      f = new flash_task(this);
+               //flash_task    f = new flash_task(this);
        }
 
        static void show(JFrame frame) {
index e0e030933257a4cb7fd6075e15e9746a7687efeb..7715eeddf840274410917d644806e3e57ca25a3d 100644 (file)
@@ -22,9 +22,9 @@ public class AltosGraphUI extends AltosFrame
     static final private Color red = new Color(194,31,31);
     static final private Color green = new Color(31,194,31);
     static final private Color blue = new Color(31,31,194);
-    static final private Color black = new Color(31,31,31);
+    //static final private Color black = new Color(31,31,31);
     static final private Color yellow = new Color(194,194,31);
-    static final private Color cyan = new Color(31,194,194);
+    //static final private Color cyan = new Color(31,194,194);
     static final private Color magenta = new Color(194,31,194);
 
     static private class OverallGraphs {
@@ -94,7 +94,7 @@ public class AltosGraphUI extends AltosFrame
                 }
             };
     
-        AltosGraphTime.Element e_pad    = new AltosGraphTime.StateMarker(Altos.ao_flight_pad, "Pad");
+        //AltosGraphTime.Element e_pad    = new AltosGraphTime.StateMarker(Altos.ao_flight_pad, "Pad");
         AltosGraphTime.Element e_boost  = new AltosGraphTime.StateMarker(Altos.ao_flight_boost, "Boost");
         AltosGraphTime.Element e_fast   = new AltosGraphTime.StateMarker(Altos.ao_flight_fast, "Fast");
         AltosGraphTime.Element e_coast  = new AltosGraphTime.StateMarker(Altos.ao_flight_coast, "Coast");
@@ -223,11 +223,13 @@ public class AltosGraphUI extends AltosFrame
         return createGraphsWhich(data, which).get(0);
     }
 
+    /*
     private static ArrayList<AltosGraph> createGraphs(
             Iterable<AltosDataPoint> data)
     {
         return createGraphsWhich(data, -1);
     }
+    */
 
     private static ArrayList<AltosGraph> createGraphsWhich(
             Iterable<AltosDataPoint> data, int which)
index c4f42125dc2739b0c254a2d5c39be36311d81785..d578f2d269bff253236cb0e68526138090ceeeb8 100644 (file)
@@ -85,9 +85,9 @@ public class AltosInfoTable extends JTable {
        }
 
        void info_add_deg(int col, String name, double v, int pos, int neg) {
-               int     c = pos;
+               //int   c = pos;
                if (v < 0) {
-                       c = neg;
+                       //c = neg;
                        v = -v;
                }
                double  deg = Math.floor(v);
@@ -184,7 +184,7 @@ public class AltosInfoTable extends JTable {
                                       state.gps.hour,
                                       state.gps.minute,
                                       state.gps.second);
-                       int     nsat_vis = 0;
+                       //int   nsat_vis = 0;
                        int     c;
 
                        if (state.gps.cc_gps_sat == null)
index d928dd5c1ce5e6d26ee32f42c5f56ec4f4a8fc2a..3ea4d0fd3548eb06bc296f35170739e7c0d22674 100644 (file)
@@ -52,11 +52,13 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
        // based on google js
        //  http://maps.gstatic.com/intl/en_us/mapfiles/api-3/2/10/main.js
        // search for fromLatLngToPoint and fromPointToLatLng
+       /*
        private static Point2D.Double pt(LatLng latlng, int zoom) {
                double scale_x = 256/360.0 * Math.pow(2, zoom);
                double scale_y = 256/(2.0*Math.PI) * Math.pow(2, zoom);
                return pt(latlng, scale_x, scale_y);
        }
+       */
 
        private static Point2D.Double pt(LatLng latlng,
                                         double scale_x, double scale_y)
@@ -99,9 +101,11 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
        private LatLng latlng(double x, double y) {
                return latlng(new Point2D.Double(x,y), scale_x, scale_y);
        }
+       /*
        private LatLng latlng(Point2D.Double pt) {
                return latlng(pt, scale_x, scale_y);
        }
+       */
 
        ConcurrentHashMap<Point,AltosSiteMapTile> mapTiles = new ConcurrentHashMap<Point,AltosSiteMapTile>();
        Point2D.Double centre;
@@ -181,8 +185,8 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
                AltosSiteMap asm = new AltosSiteMap(true);
                asm.centre = asm.getBaseLocation(lat, lng);
 
-               Point2D.Double p = new Point2D.Double();
-               Point2D.Double p2;
+               //Point2D.Double p = new Point2D.Double();
+               //Point2D.Double p2;
                int dx = -w/2, dy = -h/2;
                for (int y = dy; y < h+dy; y++) {
                        for (int x = dx; x < w+dx; x++) {
@@ -417,7 +421,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
        public AltosSiteMap(int in_radius) {
                radius = in_radius;
 
-               GrabNDrag scroller = new GrabNDrag(comp);
+               //GrabNDrag scroller = new GrabNDrag(comp);
 
                comp.setLayout(layout);
 
index 35f730e3a0821f1497098bf9d43a7b57dad26368..33849c660bb1fa12124cd0bc6f89540883defa0c 100644 (file)
@@ -176,7 +176,7 @@ class AltosSites extends Thread {
        public void run() {
                try {
                        URLConnection uc = url.openConnection();
-                       int length = uc.getContentLength();
+                       //int length = uc.getContentLength();
                        
                        InputStreamReader in_stream = new InputStreamReader(uc.getInputStream(), Altos.unicode_set);
                        BufferedReader in = new BufferedReader(in_stream);
index e4af6b3b39d295674dd79b7605c3cee5f0330bd1..b5cbefe73a352ae78362c3d1c4679b5eef21a8c9 100644 (file)
@@ -87,7 +87,7 @@ public class AltosUI extends AltosFrame {
                c.weighty = 1;
                b = new JButton(label);
 
-               Dimension ps = b.getPreferredSize();
+               //Dimension ps = b.getPreferredSize();
 
                gridbag.setConstraints(b, c);
                add(b, c);
@@ -441,7 +441,7 @@ public class AltosUI extends AltosFrame {
                        return null;
                }
                AltosRecordIterable recs;
-               AltosReplayReader reader;
+               //AltosReplayReader reader;
                if (file.getName().endsWith("eeprom")) {
                        recs = new AltosEepromIterable(in);
                } else {