diff options
Diffstat (limited to 'altosdroid/src')
3 files changed, 30 insertions, 5 deletions
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java index 3396f77e..b1fc8d30 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java @@ -189,10 +189,7 @@ public class AltosDroid extends Activity { mSerialView.setText(String.format("%d", state.data.serial)); mFlightView.setText(String.format("%d", state.data.flight)); mStateView.setText(state.data.state()); - double speed = state.speed; - if (!state.ascent) - speed = state.baro_speed; - mSpeedView.setText(String.format("%6.0f m/s", speed)); + mSpeedView.setText(String.format("%6.0f m/s", state.speed())); mAccelView.setText(String.format("%6.0f m/s²", state.acceleration)); mRangeView.setText(String.format("%6.0f m", state.range)); mHeightView.setText(String.format("%6.0f m", state.height)); diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java index 3382d551..264e35c6 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java @@ -67,7 +67,7 @@ public class AltosVoice { speak(state.data.state());
if ((old_state == null || old_state.state <= AltosLib.ao_flight_boost) &&
state.state > AltosLib.ao_flight_boost) {
- speak(String.format("max speed: %d meters per second.", (int) (state.max_speed + 0.5)));
+ speak(String.format("max speed: %d meters per second.", (int) (state.max_speed() + 0.5)));
spoke = true;
} else if ((old_state == null || old_state.state < AltosLib.ao_flight_drogue) &&
state.state >= AltosLib.ao_flight_drogue) {
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/BuildInfo.java.in b/altosdroid/src/org/altusmetrum/AltosDroid/BuildInfo.java.in new file mode 100644 index 00000000..763f814e --- /dev/null +++ b/altosdroid/src/org/altusmetrum/AltosDroid/BuildInfo.java.in @@ -0,0 +1,28 @@ +/* + * Copyright © 2012 Mike Beattie <mike@ethernal.org> + * + * 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. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package org.altusmetrum.AltosDroid; + +public class BuildInfo { + public static final String git_describe = "@DESCRIBE@"; + public static final String version = "@VERSION@"; + public static final String commitnum = "@COMMITNUM@"; + public static final String commithash = "@COMMITHASH@"; + public static final String builddate = "@BUILDDATE@"; + public static final String buildtime = "@BUILDTIME@"; +} + |
