projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch from GPLv2 to GPLv2+
[fw/altos]
/
altosdroid
/
src
/
org
/
altusmetrum
/
AltosDroid
/
AltosVoice.java
diff --git
a/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java
b/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java
index e876956d2f8f5a232943c81f58db23fff71ddc26..811b03675d63640bb62d258ce46a6a249fa43d9d 100644
(file)
--- a/
altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java
+++ b/
altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java
@@
-4,7
+4,8
@@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-22,7
+23,7
@@
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.location.Location;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.location.Location;
-import org.altusmetrum.altoslib_
7
.*;
+import org.altusmetrum.altoslib_
11
.*;
public class AltosVoice {
public class AltosVoice {
@@
-186,9
+187,9
@@
public class AltosVoice {
if (last_tell_mode != TELL_MODE_FLIGHT)
last_flight_tell = TELL_FLIGHT_NONE;
if (last_tell_mode != TELL_MODE_FLIGHT)
last_flight_tell = TELL_FLIGHT_NONE;
- if (state.state
!= last_state && AltosLib.ao_flight_boost <= state.state && state.state
<= AltosLib.ao_flight_landed) {
+ if (state.state
() != last_state && AltosLib.ao_flight_boost <= state.state() && state.state()
<= AltosLib.ao_flight_landed) {
speak(state.state_name());
speak(state.state_name());
- if (descending(state.state) && !descending(last_state)) {
+ if (descending(state.state
()
) && !descending(last_state)) {
if (state.max_height() != AltosLib.MISSING) {
speak("max height: %s.",
AltosConvert.height.say_units(state.max_height()));
if (state.max_height() != AltosLib.MISSING) {
speak("max height: %s.",
AltosConvert.height.say_units(state.max_height()));
@@
-211,7
+212,7
@@
public class AltosVoice {
if (last_flight_tell == TELL_FLIGHT_NONE || last_flight_tell == TELL_FLIGHT_STATE || last_flight_tell == TELL_FLIGHT_TRACK) {
last_flight_tell = TELL_FLIGHT_SPEED;
if (last_flight_tell == TELL_FLIGHT_NONE || last_flight_tell == TELL_FLIGHT_STATE || last_flight_tell == TELL_FLIGHT_TRACK) {
last_flight_tell = TELL_FLIGHT_SPEED;
- if (state.state <= AltosLib.ao_flight_coast) {
+ if (state.state
()
<= AltosLib.ao_flight_coast) {
speed = state.speed();
} else {
speed = state.gps_speed();
speed = state.speed();
} else {
speed = state.gps_speed();
@@
-301,10
+302,6
@@
public class AltosVoice {
else
tell_mode = TELL_MODE_RECOVER;
else
tell_mode = TELL_MODE_RECOVER;
- AltosDebug.debug("last_serial %d serial %d last_mode %d mode %d\n",
- last_tell_serial, tell_serial,
- last_tell_mode, tell_mode);
-
if (tell_mode == TELL_MODE_PAD)
spoken = tell_pad(telem_state, state, from_receiver, receiver);
else if (tell_mode == TELL_MODE_FLIGHT)
if (tell_mode == TELL_MODE_PAD)
spoken = tell_pad(telem_state, state, from_receiver, receiver);
else if (tell_mode == TELL_MODE_FLIGHT)
@@
-316,7
+313,7
@@
public class AltosVoice {
last_tell_mode = tell_mode;
last_tell_serial = tell_serial;
if (state != null) {
last_tell_mode = tell_mode;
last_tell_serial = tell_serial;
if (state != null) {
- last_state = state.state;
+ last_state = state.state
()
;
last_height = state.height();
if (state.gps != null)
last_gps = state.gps;
last_height = state.height();
if (state.gps != null)
last_gps = state.gps;