diff options
author | Keith Packard <keithp@keithp.com> | 2013-09-02 23:10:23 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-09-02 23:11:52 -0600 |
commit | 528e2e41112cad8a81bccbb89c3bd202b818a506 (patch) | |
tree | 2c2076a5d1972681ba3300e9a44636b526efaa82 /altosui/AltosDisplayThread.java | |
parent | 224a1e01bacb7db0076129906ed58e1c785e1b14 (diff) |
altoslib: More AltosState hacking
EasyMini graphs are looking good now.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosDisplayThread.java')
-rw-r--r-- | altosui/AltosDisplayThread.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/altosui/AltosDisplayThread.java b/altosui/AltosDisplayThread.java index 7a750c86..c894c2d0 100644 --- a/altosui/AltosDisplayThread.java +++ b/altosui/AltosDisplayThread.java @@ -92,14 +92,14 @@ public class AltosDisplayThread extends Thread { state.range >= 0) { voice.speak("Height %s, bearing %s %d, elevation %d, range %s.\n", - AltosConvert.height.say(state.height), + AltosConvert.height.say(state.height()), state.from_pad.bearing_words( AltosGreatCircle.BEARING_VOICE), (int) (state.from_pad.bearing + 0.5), (int) (state.elevation + 0.5), AltosConvert.distance.say(state.range)); } else if (state.state > Altos.ao_flight_pad) { - voice.speak(AltosConvert.height.say_units(state.height)); + voice.speak(AltosConvert.height.say_units(state.height())); } else { reported_landing = 0; } @@ -113,7 +113,7 @@ public class AltosDisplayThread extends Thread { System.currentTimeMillis() - state.received_time >= 15000 || state.state == Altos.ao_flight_landed)) { - if (Math.abs(state.speed) < 20 && state.height < 100) + if (Math.abs(state.speed()) < 20 && state.height() < 100) voice.speak("rocket landed safely"); else voice.speak("rocket may have crashed"); @@ -185,12 +185,12 @@ public class AltosDisplayThread extends Thread { if ((old_state == null || old_state.state <= Altos.ao_flight_boost) && state.state > Altos.ao_flight_boost) { voice.speak("max speed: %s.", - AltosConvert.speed.say_units(state.max_speed + 0.5)); + AltosConvert.speed.say_units(state.max_speed() + 0.5)); ret = true; } else if ((old_state == null || old_state.state < Altos.ao_flight_drogue) && state.state >= Altos.ao_flight_drogue) { voice.speak("max height: %s.", - AltosConvert.height.say_units(state.max_height + 0.5)); + AltosConvert.height.say_units(state.max_height() + 0.5)); ret = true; } } |