X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosPad.java;h=66cb4cfca83f3409d72763d05703a796f07b1515;hb=e747156d0ea4b62eea30a8f486ee105ee35dcaf5;hp=d13f69458c4705470cfc6cf398af73aee44f7d45;hpb=bf88c5f829ea5d32043431945e862a9f6c96740a;p=fw%2Faltos diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index d13f6945..66cb4cfc 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -168,8 +168,12 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { class Battery extends LaunchStatus { void show (AltosState state, int crc_errors) { - show("%4.2f V", state.battery); - lights.set(state.battery > 3.7); + if (state.battery == AltosRecord.MISSING) + hide(); + else { + show("%4.2f V", state.battery); + lights.set(state.battery > 3.7); + } } public Battery (GridBagLayout layout, int y) { super(layout, y, "Battery Voltage"); @@ -285,7 +289,10 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { class PadAlt extends LaunchValue { void show (AltosState state, int crc_errors) { - show("%4.0f m", state.pad_alt); + if (state.pad_alt == AltosRecord.MISSING) + hide(); + else + show("%4.0f m", state.pad_alt); } public PadAlt (GridBagLayout layout, int y) { super (layout, y, "Pad Altitude");