From 0afa07d3c1dcb5e301fcb8b4edfecdd961662478 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 12 Sep 2015 19:20:49 -0700 Subject: 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 --- altosuilib/AltosGraphDataPoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'altosuilib/AltosGraphDataPoint.java') 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) { -- cgit v1.2.3