summaryrefslogtreecommitdiff
path: root/altoslib/AltosTelemetryFile.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-09-12 19:20:49 -0700
committerKeith Packard <keithp@keithp.com>2015-10-13 13:54:28 -0700
commit0afa07d3c1dcb5e301fcb8b4edfecdd961662478 (patch)
treebd0742a81d3ef60933358fa5151e5d49910cacbe /altoslib/AltosTelemetryFile.java
parent7064bc685aebeef07711e525dea4d5fbe33d235b (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/AltosTelemetryFile.java')
-rw-r--r--altoslib/AltosTelemetryFile.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/altoslib/AltosTelemetryFile.java b/altoslib/AltosTelemetryFile.java
index d2275f54..d87939ff 100644
--- a/altoslib/AltosTelemetryFile.java
+++ b/altoslib/AltosTelemetryFile.java
@@ -75,7 +75,7 @@ public class AltosTelemetryFile extends AltosStateIterable {
for (AltosTelemetry telem : telems) {
telem.update_state(state);
state.finish_update();
- if (state.state != AltosLib.ao_flight_invalid && state.state >= AltosLib.ao_flight_boost) {
+ if (state.state() != AltosLib.ao_flight_invalid && state.state() >= AltosLib.ao_flight_boost) {
start.set_boost_tick(state.tick);
break;
}
@@ -93,4 +93,4 @@ public class AltosTelemetryFile extends AltosStateIterable {
}
return new AltosTelemetryIterator(state, i);
}
-} \ No newline at end of file
+}