diff options
author | Keith Packard <keithp@keithp.com> | 2017-06-20 11:18:41 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-06-20 11:18:41 -0700 |
commit | 0da4e201041a4420f273c2e0cda77eea78099518 (patch) | |
tree | 617f28dbd38b7ade20edb7eb1676ee2b3fc917b0 /altosui/AltosPad.java | |
parent | a61217f0a6d0ef48b6471f632c4600255867e831 (diff) |
altoslib: Make cal_data private in AltosDataListener
This way we can create it as needed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosPad.java')
-rw-r--r-- | altosui/AltosPad.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index 331b58e3..0aeef8e1 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -46,10 +46,11 @@ public class AltosPad extends AltosUIFlightTab { class LoggingReady extends AltosUIIndicator { public void show (AltosState state, AltosListenerState listener_state) { - if (state == null || state.cal_data.flight == AltosLib.MISSING) { + AltosCalData cal_data = state.cal_data(); + if (state == null || cal_data.flight == AltosLib.MISSING) { hide(); } else { - if (state.cal_data.flight != 0) { + if (cal_data.flight != 0) { if (state.state() <= Altos.ao_flight_pad) show("Ready to record"); else if (state.state() < Altos.ao_flight_landed || @@ -59,7 +60,7 @@ public class AltosPad extends AltosUIFlightTab { show("Recorded data"); } else show("Storage full"); - set_lights(state.cal_data.flight != 0); + set_lights(cal_data.flight != 0); } } public LoggingReady (AltosUIFlightTab container, int y) { |