X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosDescent.java;h=2ea7cbfa7058a219e0d8e8a5b4e7d999bc051e78;hb=12a9bd0479db25cbe45c0385913315cc1e0bc892;hp=e9ff590b735e6d79dbec25187ad421426bd9f8f0;hpb=19243ecc9b5bbdcc069ae24acf1ca807322c84d8;p=fw%2Faltos diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java index e9ff590b..2ea7cbfa 100644 --- a/altosui/AltosDescent.java +++ b/altosui/AltosDescent.java @@ -256,7 +256,7 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay { class Speed extends DescentValue { void show (AltosState state, int crc_errors) { - double speed = state.speed; + double speed = state.accel_speed; if (!state.ascent) speed = state.baro_speed; show(AltosConvert.speed, speed); @@ -309,7 +309,10 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay { class Distance extends DescentValue { void show(AltosState state, int crc_errors) { - show(AltosConvert.distance, state.from_pad.distance); + if (state.from_pad != null) + show(AltosConvert.distance, state.from_pad.distance); + else + show("???"); } public Distance (GridBagLayout layout, int x, int y) {