X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosConfig.java;h=44e5a3faf4c5265414476cbc0bc31464543c5a4a;hp=58da405fc12d24d57bef727a045d6e39820bf73f;hb=52d3cad4f744140e1aa06fdfc0d49a0cf8734fd4;hpb=cc305ea231ae22278abf91c0d9925f5992945369 diff --git a/altosui/AltosConfig.java b/altosui/AltosConfig.java index 58da405f..44e5a3fa 100644 --- a/altosui/AltosConfig.java +++ b/altosui/AltosConfig.java @@ -17,18 +17,11 @@ 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 libaltosJNI.*; +import org.altusmetrum.AltosLib.*; public class AltosConfig implements ActionListener { @@ -299,7 +292,7 @@ public class AltosConfig implements ActionListener { if (remote) { serial_line.stop_remote(); serial_line.set_radio_frequency(frequency); - AltosPreferences.set_frequency(device.getSerial(), frequency); + AltosUIPreferences.set_frequency(device.getSerial(), frequency); serial_line.start_remote(); } serial_line.printf("c c %s\n", callsign.get()); @@ -490,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) { @@ -509,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); } } }