X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosIgniteUI.java;h=14d4eebcbaf210013215e704ae3b7849613a2161;hp=8623cbef3ace51a255f36899b68951727f867d45;hb=2e28d3541b8da31ebef5a199baf8f544d238298e;hpb=7ecde50fbebe68a2e2200a2f8d081fd37074f840 diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 8623cbef..14d4eebc 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -20,17 +20,14 @@ package altosui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.filechooser.FileNameExtensionFilter; -import javax.swing.table.*; -import javax.swing.event.*; import java.io.*; -import java.util.*; import java.text.*; -import java.util.prefs.*; import java.util.concurrent.*; +import org.altusmetrum.altoslib_1.*; +import org.altusmetrum.altosuilib_1.*; public class AltosIgniteUI - extends AltosDialog + extends AltosUIDialog implements ActionListener { AltosDevice device; @@ -71,12 +68,15 @@ public class AltosIgniteUI public void run () { try { - ignite = new AltosIgnite(device); + AltosSerial serial = new AltosSerial(device); + serial.set_frame(owner); + ignite = new AltosIgnite(serial, + !device.matchProduct(Altos.product_altimeter)); + } catch (Exception e) { send_exception(e); return; } - ignite.set_frame(owner); for (;;) { Runnable r; @@ -305,7 +305,7 @@ public class AltosIgniteUI private boolean open() { command_queue = new LinkedBlockingQueue(); - device = AltosDeviceDialog.show(owner, Altos.product_any); + device = AltosDeviceUIDialog.show(owner, Altos.product_any); if (device != null) { IgniteHandler handler = new IgniteHandler(owner); Thread t = new Thread(handler);