From: Keith Packard Date: Wed, 17 Jun 2015 06:42:59 +0000 (-0700) Subject: altosuilib: Show state.product if state.device_type isn't set X-Git-Tag: 1.6.0.3~36 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=cdeefaba7d5ef69f28e5dfb152c5f185f8b85f2e altosuilib: Show state.product if state.device_type isn't set MonitorIdle doesn't get the device type, only the product. Signed-off-by: Keith Packard --- diff --git a/altosuilib/AltosInfoTable.java b/altosuilib/AltosInfoTable.java index 99f17617..68008b2f 100644 --- a/altosuilib/AltosInfoTable.java +++ b/altosuilib/AltosInfoTable.java @@ -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)