X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosInfoTable.java;fp=altosui%2FAltosInfoTable.java;h=1dce6dafbc216493726469b081a4676360359e35;hp=2facf38ae21f76f95a6a9005804840f846eae321;hb=e747156d0ea4b62eea30a8f486ee105ee35dcaf5;hpb=997cdef3fe04acdd566d287e70981f7b7934d0c8 diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index 2facf38a..1dce6daf 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -108,16 +108,26 @@ public class AltosInfoTable extends JTable { if (state == null) return; info_reset(); - info_add_row(0, "Altitude", "%6.0f m", state.altitude); - info_add_row(0, "Pad altitude", "%6.0f m", state.ground_altitude); - info_add_row(0, "Height", "%6.0f m", state.height); - info_add_row(0, "Max height", "%6.0f m", state.max_height); - info_add_row(0, "Acceleration", "%8.1f m/s²", state.acceleration); - info_add_row(0, "Max acceleration", "%8.1f m/s²", state.max_acceleration); - info_add_row(0, "Speed", "%8.1f m/s", state.speed()); - info_add_row(0, "Max Speed", "%8.1f m/s", state.max_accel_speed); - info_add_row(0, "Temperature", "%9.2f °C", state.temperature); - info_add_row(0, "Battery", "%9.2f V", state.battery); + if (state.altitude != AltosRecord.MISSING) + info_add_row(0, "Altitude", "%6.0f m", state.altitude); + if (state.ground_altitude != AltosRecord.MISSING) + info_add_row(0, "Pad altitude", "%6.0f m", state.ground_altitude); + if (state.height != AltosRecord.MISSING) + info_add_row(0, "Height", "%6.0f m", state.height); + if (state.max_height != AltosRecord.MISSING) + info_add_row(0, "Max height", "%6.0f m", state.max_height); + if (state.acceleration != AltosRecord.MISSING) + info_add_row(0, "Acceleration", "%8.1f m/s²", state.acceleration); + if (state.max_acceleration != AltosRecord.MISSING) + info_add_row(0, "Max acceleration", "%8.1f m/s²", state.max_acceleration); + if (state.speed() != AltosRecord.MISSING) + info_add_row(0, "Speed", "%8.1f m/s", state.speed()); + if (state.max_speed() != AltosRecord.MISSING) + info_add_row(0, "Max Speed", "%8.1f m/s", state.max_accel_speed); + if (state.temperature != AltosRecord.MISSING) + info_add_row(0, "Temperature", "%9.2f °C", state.temperature); + if (state.battery != AltosRecord.MISSING) + info_add_row(0, "Battery", "%9.2f V", state.battery); if (state.drogue_sense != AltosRecord.MISSING) info_add_row(0, "Drogue", "%9.2f V", state.drogue_sense); if (state.main_sense != AltosRecord.MISSING)