When the GPS isn't locked, the distance from the pad cannot be
computed and is left missing. Not crashing in this case is more useful.
Signed-off-by: Keith Packard <keithp@keithp.com>
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) {