summaryrefslogtreecommitdiff
path: root/altoslib/AltosReplayReader.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/AltosReplayReader.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/AltosReplayReader.java')
-rw-r--r--altoslib/AltosReplayReader.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/altoslib/AltosReplayReader.java b/altoslib/AltosReplayReader.java
index 9419ec93..55faa17c 100644
--- a/altoslib/AltosReplayReader.java
+++ b/altoslib/AltosReplayReader.java
@@ -39,7 +39,7 @@ public class AltosReplayReader extends AltosFlightReader {
public void update(AltosState state) throws InterruptedException {
/* Make it run in realtime after the rocket leaves the pad */
- if (state.state > AltosLib.ao_flight_pad && state.time_change > 0)
+ if (state.state() > AltosLib.ao_flight_pad && state.time_change > 0)
Thread.sleep((int) (Math.min(state.time_change,10) * 1000));
state.set_received_time(System.currentTimeMillis());
}