Merge branch 'prefs_interface' into altosdroid
[fw/altos] / altosui / AltosConfig.java
index 35fef08030c00bc6c37dbaadde46b728cbe1bdf1..44e5a3faf4c5265414476cbc0bc31464543c5a4a 100644 (file)
 
 package altosui;
 
-import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
-import javax.swing.filechooser.FileNameExtensionFilter;
-import javax.swing.table.*;
 import java.io.*;
-import java.util.*;
-import java.text.*;
-import java.util.prefs.*;
 import java.util.concurrent.*;
 import org.altusmetrum.AltosLib.*;
 
-import libaltosJNI.*;
-
 public class AltosConfig implements ActionListener {
 
        class int_ref {
@@ -491,7 +483,7 @@ public class AltosConfig implements ActionListener {
                        try {
                                serial_line = new AltosSerial(device);
                                try {
-                                       if (!device.matchProduct(Altos.product_telemetrum))
+                                       if (!device.matchProduct(Altos.product_altimeter))
                                                remote = true;
                                        init_ui();
                                } catch (InterruptedException ie) {
@@ -510,11 +502,6 @@ public class AltosConfig implements ActionListener {
                                                                            device.toShortString()),
                                                              "Device in use",
                                                              JOptionPane.ERROR_MESSAGE);
-                       } catch (IOException ee) {
-                               JOptionPane.showMessageDialog(owner,
-                                                             device.toShortString(),
-                                                             ee.getLocalizedMessage(),
-                                                             JOptionPane.ERROR_MESSAGE);
                        }
                }
        }