}
void abort() {
- serial_line.close();
- serial_line = null;
+ if (serial_line != null) {
+ serial_line.close();
+ serial_line = null;
+ }
JOptionPane.showMessageDialog(owner,
String.format("Connection to \"%s\" failed",
device.toShortString()),
try {
serial_line = new AltosSerial(device);
try {
- if (!device.matchProduct(Altos.product_altimeter))
+ if (device.matchProduct(Altos.product_basestation))
remote = true;
init_ui();
} catch (InterruptedException ie) {