diff options
author | Keith Packard <keithp@keithp.com> | 2015-09-12 19:20:49 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-10-13 13:54:28 -0700 |
commit | 0afa07d3c1dcb5e301fcb8b4edfecdd961662478 (patch) | |
tree | bd0742a81d3ef60933358fa5151e5d49910cacbe /altoslib/AltosTelemetry.java | |
parent | 7064bc685aebeef07711e525dea4d5fbe33d235b (diff) |
altoslib: Hide 'state' member and use accessor function
Someone was smashing the state to 'landed' when no packets had been
received for a while. Found that by making it impossible for anyone
outside of AltosState to change the value.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosTelemetry.java')
-rw-r--r-- | altoslib/AltosTelemetry.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/altoslib/AltosTelemetry.java b/altoslib/AltosTelemetry.java index 4c973cd9..821adc84 100644 --- a/altoslib/AltosTelemetry.java +++ b/altoslib/AltosTelemetry.java @@ -44,7 +44,7 @@ public abstract class AltosTelemetry implements AltosStateUpdate { public void update_state(AltosState state) { state.set_serial(serial); - if (state.state == AltosLib.ao_flight_invalid) + if (state.state() == AltosLib.ao_flight_invalid) state.set_state(AltosLib.ao_flight_startup); state.set_tick(tick); state.set_rssi(rssi, status); |