diff options
| author | Bdale Garbee <bdale@gag.com> | 2014-09-09 23:28:39 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2014-09-09 23:28:39 -0600 |
| commit | 16405fd3eb6f82ef3a709e3ed30fc48faef7b547 (patch) | |
| tree | c111819b3ba0c9357af41c81b798326b9df7adad /altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java | |
| parent | 5a2f6ed6210844f7284fbf9f7ecba68c8a14fa52 (diff) | |
| parent | 28bd5057252e61bc5b1a35a00bc1f9fdfde097f7 (diff) | |
Merge branch 'branch-1.5' into debian
Conflicts:
ChangeLog
Releasing
altosui/Instdrv/NSIS/Includes/java.nsh
altosui/altos-windows.nsi.in
configure.ac
doc/Makefile
doc/altusmetrum.xsl
micropeak/micropeak-windows.nsi.in
telegps/telegps-windows.nsi.in
Diffstat (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java')
| -rw-r--r-- | altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java index b2e6fd20..b257b936 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java @@ -17,7 +17,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altoslib_5.*; import android.app.Activity; import android.os.Bundle; @@ -28,7 +28,7 @@ import android.view.ViewGroup; import android.widget.TextView; import android.location.Location; -public class TabLanded extends Fragment implements AltosDroidTab { +public class TabLanded extends AltosDroidTab { AltosDroid mAltosDroid; private TextView mBearingView; @@ -73,10 +73,12 @@ public class TabLanded extends Fragment implements AltosDroidTab { mAltosDroid = null; } - public void update_ui(AltosState state, AltosGreatCircle from_receiver, Location receiver) { + public String tab_name() { return "landed"; } + + public void show(AltosState state, AltosGreatCircle from_receiver, Location receiver) { if (from_receiver != null) { mBearingView.setText(String.format("%3.0f°", from_receiver.bearing)); - mDistanceView.setText(String.format("%6.0f m", from_receiver.distance)); + set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance); } if (state != null && state.gps != null) { mTargetLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S")); @@ -87,12 +89,11 @@ public class TabLanded extends Fragment implements AltosDroidTab { mReceiverLatitudeView.setText(AltosDroid.pos(receiver.getLatitude(), "N", "S")); mReceiverLongitudeView.setText(AltosDroid.pos(receiver.getLongitude(), "W", "E")); } - + if (state != null) { - mMaxHeightView.setText(String.format("%6.0f m", state.max_height())); - mMaxAccelView.setText(String.format("%6.0f m/s²", state.max_acceleration())); - mMaxSpeedView.setText(String.format("%6.0f m/s", state.max_speed())); + set_value(mMaxHeightView, AltosConvert.height, 6, state.max_height()); + set_value(mMaxAccelView, AltosConvert.accel, 6, state.max_acceleration()); + set_value(mMaxSpeedView, AltosConvert.speed, 6, state.max_speed()); } } - } |
