X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosIgniteUI.java;h=c8024aaedacf2773338179443abdd98b6c753008;hp=076d99b209d537ded052eaf6257ca6c982e87705;hb=89fc38f2cf143bed1fe8c4a4972267b15c9aa467;hpb=3c2f601139d36761de6a8a2210545d082ef16133 diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 076d99b2..c8024aae 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -20,18 +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.*; +import org.altusmetrum.altoslib_2.*; +import org.altusmetrum.altosuilib_1.*; public class AltosIgniteUI - extends AltosDialog + extends AltosUIDialog implements ActionListener { AltosDevice device; @@ -72,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; @@ -306,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);