altosuilib: Show state.product if state.device_type isn't set
authorKeith Packard <keithp@keithp.com>
Wed, 17 Jun 2015 06:42:59 +0000 (23:42 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 17 Jun 2015 07:13:03 +0000 (00:13 -0700)
MonitorIdle doesn't get the device type, only the product.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosInfoTable.java

index 99f17617b4ce24916154ba5e686a112bd1095eed..68008b2fccd21eaf4cde58d47957289e2af8b16b 100644 (file)
@@ -137,6 +137,8 @@ public class AltosInfoTable extends JTable implements AltosFlightDisplay, Hierar
                if (state != null) {
                        if (state.device_type != AltosLib.MISSING)
                                info_add_row(0, "Device", "%s", AltosLib.product_name(state.device_type));
+                       else if (state.product != null)
+                               info_add_row(0, "Device", "%s", state.product);
                        if (state.altitude() != AltosLib.MISSING)
                                info_add_row(0, "Altitude", "%6.0f    m", state.altitude());
                        if (state.ground_altitude() != AltosLib.MISSING)