X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosDescent.java;h=2ea7cbfa7058a219e0d8e8a5b4e7d999bc051e78;hb=371da0c909098092db7b596496df9d58eed43703;hp=e9ff590b735e6d79dbec25187ad421426bd9f8f0;hpb=52d3cad4f744140e1aa06fdfc0d49a0cf8734fd4;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) {