altoslib: Remove older eeprom handling code
[fw/altos] / altosui / AltosIdleMonitorUI.java
index 2f14e2dffa38db5b9bb37c5d5021fa0da9c43133..4d5c3b2df7661f96c6f91b67a8e7120bcd7d830a 100644 (file)
@@ -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
@@ -24,8 +25,8 @@ import javax.swing.event.*;
 import java.io.*;
 import java.util.concurrent.*;
 import java.util.Arrays;
-import org.altusmetrum.altoslib_10.*;
-import org.altusmetrum.altosuilib_10.*;
+import org.altusmetrum.altoslib_11.*;
+import org.altusmetrum.altosuilib_11.*;
 
 public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDisplay, AltosIdleMonitorListener, DocumentListener {
        AltosDevice             device;
@@ -35,7 +36,7 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl
        AltosFlightStatus       flightStatus;
        AltosIgnitor            ignitor;
        AltosIdleMonitor        thread;
-       AltosUIMapNew           sitemap;
+       AltosUIMap              sitemap;
        int                     serial;
        boolean                 remote;
        boolean                 has_ignitor;
@@ -128,6 +129,19 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl
                SwingUtilities.invokeLater(r);
        }
 
+       public void error(final String reason) {
+               Runnable r = new Runnable() {
+                               public void run() {
+                                       disconnect();
+                                       JOptionPane.showMessageDialog(AltosIdleMonitorUI.this,
+                                                                     reason,
+                                                                     "Error fetching data",
+                                                                     JOptionPane.ERROR_MESSAGE);
+                               }
+                       };
+               SwingUtilities.invokeLater(r);
+       }
+
        Container       bag;
        AltosUIFreqList frequencies;
        JTextField      callsign_value;
@@ -262,7 +276,7 @@ public class AltosIdleMonitorUI extends AltosUIFrame implements AltosFlightDispl
 
                ignitor = new AltosIgnitor();
 
-               sitemap = new AltosUIMapNew();
+               sitemap = new AltosUIMap();
 
                /* Make the tabbed pane use the rest of the window space */
                bag.add(pane, constraints(0, 4, GridBagConstraints.BOTH));