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 /altosuilib/AltosGraphDataPoint.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 'altosuilib/AltosGraphDataPoint.java')
-rw-r--r-- | altosuilib/AltosGraphDataPoint.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/altosuilib/AltosGraphDataPoint.java b/altosuilib/AltosGraphDataPoint.java index 30d436ae..ce76e906 100644 --- a/altosuilib/AltosGraphDataPoint.java +++ b/altosuilib/AltosGraphDataPoint.java @@ -217,7 +217,7 @@ public class AltosGraphDataPoint implements AltosUIDataPoint { public int id(int index) { if (index == data_state) { - int s = state.state; + int s = state.state(); if (AltosLib.ao_flight_boost <= s && s <= AltosLib.ao_flight_landed) return s; } else if (data_ignitor_fired_0 <= index && index <= data_ignitor_fired_max) { |