altosdroid: Switch to four tabs (pad/flight/recover/map)
authorKeith Packard <keithp@keithp.com>
Tue, 23 Jun 2015 03:43:23 +0000 (20:43 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 23 Jun 2015 04:04:43 +0000 (21:04 -0700)
Ascent and descent were almost the same; no reason to have both.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 files changed:
altosdroid/res/layout/tab_ascent.xml [deleted file]
altosdroid/res/layout/tab_descent.xml [deleted file]
altosdroid/res/layout/tab_flight.xml [new file with mode: 0644]
altosdroid/res/layout/tab_landed.xml [deleted file]
altosdroid/res/layout/tab_recover.xml [new file with mode: 0644]
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java
altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java [deleted file]
altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java [deleted file]
altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java [new file with mode: 0644]
altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java [deleted file]
altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java [new file with mode: 0644]

diff --git a/altosdroid/res/layout/tab_ascent.xml b/altosdroid/res/layout/tab_ascent.xml
deleted file mode 100644 (file)
index b21ec42..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright © 2013 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.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-       android:layout_width="fill_parent"
-       android:layout_height="wrap_content"
-       android:orientation="vertical" >
-
-       <LinearLayout
-               xmlns:android="http://schemas.android.com/apk/res/android"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="0"
-               android:baselineAligned="true"
-               android:orientation="horizontal"
-               android:paddingTop="5dp" >
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/height_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/height_label" />
-
-                       <TextView
-                               android:id="@+id/height_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/height_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/max_height_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/max_height_label" />
-
-                       <TextView
-                               android:id="@+id/max_height_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/max_height_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-       </LinearLayout>
-
-       <LinearLayout
-               xmlns:android="http://schemas.android.com/apk/res/android"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="0"
-               android:baselineAligned="true"
-               android:orientation="horizontal"
-               android:paddingTop="5dp" >
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/speed_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/speed_label" />
-
-                       <TextView
-                               android:id="@+id/speed_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/speed_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/max_speed_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/max_speed_label" />
-
-                       <TextView
-                               android:id="@+id/max_speed_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/max_speed_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-       </LinearLayout>
-
-       <LinearLayout
-               xmlns:android="http://schemas.android.com/apk/res/android"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="0"
-               android:baselineAligned="true"
-               android:orientation="horizontal"
-               android:paddingTop="5dp" >
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/accel_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/accel_label" />
-
-                       <TextView
-                               android:id="@+id/accel_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/accel_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/max_accel_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/max_accel_label" />
-
-                       <TextView
-                               android:id="@+id/max_accel_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/max_accel_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-       </LinearLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/lat_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/latitude_label" />
-
-               <TextView
-                       android:id="@+id/lat_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/lat_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/lon_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/longitude_label" />
-
-               <TextView
-                       android:id="@+id/lon_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/lon_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <ImageView
-                       android:id="@+id/apogee_redled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:contentDescription="@string/apogee_voltage_label"
-                       android:src="@drawable/grayled" />
-
-               <ImageView
-                       android:id="@+id/apogee_greenled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/apogee_redled"
-                       android:contentDescription="@string/apogee_voltage_label"
-                       android:paddingRight="5dp"
-                       android:src="@drawable/grayled" />
-
-               <TextView
-                       android:id="@+id/apogee_voltage_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/apogee_greenled"
-                       android:text="@string/apogee_voltage_label" />
-
-               <TextView
-                       android:id="@+id/apogee_voltage_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/apogee_voltage_label"
-                       android:layout_toRightOf="@id/apogee_greenled"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <ImageView
-                       android:id="@+id/main_redled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:contentDescription="@string/main_voltage_label"
-                       android:src="@drawable/grayled" />
-
-               <ImageView
-                       android:id="@+id/main_greenled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/main_redled"
-                       android:contentDescription="@string/main_voltage_label"
-                       android:paddingRight="5dp"
-                       android:src="@drawable/grayled" />
-
-               <TextView
-                       android:id="@+id/main_voltage_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/main_greenled"
-                       android:text="@string/main_voltage_label" />
-
-               <TextView
-                       android:id="@+id/main_voltage_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/main_voltage_label"
-                       android:layout_toRightOf="@id/main_greenled"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/altosdroid/res/layout/tab_descent.xml b/altosdroid/res/layout/tab_descent.xml
deleted file mode 100644 (file)
index 9e1fc82..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright © 2013 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.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-       android:layout_width="fill_parent"
-       android:layout_height="wrap_content"
-       android:orientation="vertical" >
-
-       <LinearLayout
-               xmlns:android="http://schemas.android.com/apk/res/android"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="0"
-               android:baselineAligned="true"
-               android:orientation="horizontal" >
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/speed_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/speed_label" />
-
-                       <TextView
-                               android:id="@+id/speed_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/speed_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/height_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/height_label" />
-
-                       <TextView
-                               android:id="@+id/height_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/height_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-       </LinearLayout>
-
-       <LinearLayout
-               xmlns:android="http://schemas.android.com/apk/res/android"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="0"
-               android:baselineAligned="true"
-               android:orientation="horizontal"
-               android:paddingTop="5dp" >
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/elevation_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/elevation_label" />
-
-                       <TextView
-                               android:id="@+id/elevation_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/elevation_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/range_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/range_label" />
-
-                       <TextView
-                               android:id="@+id/range_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/range_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-       </LinearLayout>
-
-       <LinearLayout
-               xmlns:android="http://schemas.android.com/apk/res/android"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="0"
-               android:baselineAligned="true"
-               android:orientation="horizontal"
-               android:paddingTop="5dp" >
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/bearing_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/bearing_label" />
-
-                       <TextView
-                               android:id="@+id/bearing_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/bearing_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/compass_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="" />
-
-                       <TextView
-                               android:id="@+id/compass_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/compass_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-       </LinearLayout>
-
-       <LinearLayout
-               xmlns:android="http://schemas.android.com/apk/res/android"
-               android:layout_width="fill_parent"
-               android:layout_height="wrap_content"
-               android:layout_weight="0"
-               android:baselineAligned="true"
-               android:orientation="horizontal"
-               android:paddingTop="5dp" >
-
-               <RelativeLayout
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-
-                       <TextView
-                               android:id="@+id/distance_label"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:text="@string/gnd_distance_label" />
-
-                       <TextView
-                               android:id="@+id/distance_value"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               android:layout_alignParentRight="true"
-                               android:layout_below="@id/distance_label"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall" />
-               </RelativeLayout>
-
-               <TextView
-                       android:layout_width="0dp"
-                       android:layout_height="wrap_content"
-                       android:layout_weight="1" >
-               </TextView>
-
-       </LinearLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/lat_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/latitude_label" />
-
-               <TextView
-                       android:id="@+id/lat_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/lat_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/lon_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/longitude_label" />
-
-               <TextView
-                       android:id="@+id/lon_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/lon_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <ImageView
-                       android:id="@+id/apogee_redled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:contentDescription="@string/apogee_voltage_label"
-                       android:src="@drawable/grayled" />
-
-               <ImageView
-                       android:id="@+id/apogee_greenled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/apogee_redled"
-                       android:contentDescription="@string/apogee_voltage_label"
-                       android:paddingRight="5dp"
-                       android:src="@drawable/grayled" />
-
-               <TextView
-                       android:id="@+id/apogee_voltage_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/apogee_greenled"
-                       android:text="@string/apogee_voltage_label" />
-
-               <TextView
-                       android:id="@+id/apogee_voltage_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/apogee_voltage_label"
-                       android:layout_toRightOf="@id/apogee_greenled"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <ImageView
-                       android:id="@+id/main_redled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:contentDescription="@string/main_voltage_label"
-                       android:src="@drawable/grayled" />
-
-               <ImageView
-                       android:id="@+id/main_greenled"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/main_redled"
-                       android:contentDescription="@string/main_voltage_label"
-                       android:paddingRight="5dp"
-                       android:src="@drawable/grayled" />
-
-               <TextView
-                       android:id="@+id/main_voltage_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_toRightOf="@id/main_greenled"
-                       android:text="@string/main_voltage_label" />
-
-               <TextView
-                       android:id="@+id/main_voltage_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/main_voltage_label"
-                       android:layout_toRightOf="@id/main_greenled"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-</LinearLayout>
diff --git a/altosdroid/res/layout/tab_flight.xml b/altosdroid/res/layout/tab_flight.xml
new file mode 100644 (file)
index 0000000..4fa026c
--- /dev/null
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright © 2013 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+       android:layout_width="fill_parent"
+       android:layout_height="wrap_content"
+       android:orientation="vertical" >
+
+       <LinearLayout
+               xmlns:android="http://schemas.android.com/apk/res/android"
+               android:layout_width="fill_parent"
+               android:layout_height="wrap_content"
+               android:layout_weight="0"
+               android:baselineAligned="true"
+               android:orientation="horizontal" >
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/speed_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/speed_label" />
+
+                       <TextView
+                               android:id="@+id/speed_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/speed_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/height_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/height_label" />
+
+                       <TextView
+                               android:id="@+id/height_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/height_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+       </LinearLayout>
+
+       <LinearLayout
+               xmlns:android="http://schemas.android.com/apk/res/android"
+               android:layout_width="fill_parent"
+               android:layout_height="wrap_content"
+               android:layout_weight="0"
+               android:baselineAligned="true"
+               android:orientation="horizontal" >
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/max_speed_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/max_speed_label" />
+
+                       <TextView
+                               android:id="@+id/max_speed_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/max_speed_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/max_height_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/max_height_label" />
+
+                       <TextView
+                               android:id="@+id/max_height_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/max_height_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+       </LinearLayout>
+
+       <LinearLayout
+               xmlns:android="http://schemas.android.com/apk/res/android"
+               android:layout_width="fill_parent"
+               android:layout_height="wrap_content"
+               android:layout_weight="0"
+               android:baselineAligned="true"
+               android:orientation="horizontal"
+               android:paddingTop="5dp" >
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/elevation_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/elevation_label" />
+
+                       <TextView
+                               android:id="@+id/elevation_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/elevation_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/range_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/range_label" />
+
+                       <TextView
+                               android:id="@+id/range_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/range_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+       </LinearLayout>
+
+       <LinearLayout
+               xmlns:android="http://schemas.android.com/apk/res/android"
+               android:layout_width="fill_parent"
+               android:layout_height="wrap_content"
+               android:layout_weight="0"
+               android:baselineAligned="true"
+               android:orientation="horizontal"
+               android:paddingTop="5dp" >
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/bearing_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/bearing_label" />
+
+                       <TextView
+                               android:id="@+id/bearing_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/bearing_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/compass_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="" />
+
+                       <TextView
+                               android:id="@+id/compass_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/compass_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+       </LinearLayout>
+
+       <LinearLayout
+               xmlns:android="http://schemas.android.com/apk/res/android"
+               android:layout_width="fill_parent"
+               android:layout_height="wrap_content"
+               android:layout_weight="0"
+               android:baselineAligned="true"
+               android:orientation="horizontal"
+               android:paddingTop="5dp" >
+
+               <RelativeLayout
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+
+                       <TextView
+                               android:id="@+id/distance_label"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:text="@string/gnd_distance_label" />
+
+                       <TextView
+                               android:id="@+id/distance_value"
+                               android:layout_width="wrap_content"
+                               android:layout_height="wrap_content"
+                               android:layout_alignParentRight="true"
+                               android:layout_below="@id/distance_label"
+                               android:text=""
+                               android:textAppearance="?android:attr/textAppearanceSmall" />
+               </RelativeLayout>
+
+               <TextView
+                       android:layout_width="0dp"
+                       android:layout_height="wrap_content"
+                       android:layout_weight="1" >
+               </TextView>
+
+       </LinearLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/lat_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/latitude_label" />
+
+               <TextView
+                       android:id="@+id/lat_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/lat_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/lon_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/longitude_label" />
+
+               <TextView
+                       android:id="@+id/lon_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/lon_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <ImageView
+                       android:id="@+id/apogee_redled"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:contentDescription="@string/apogee_voltage_label"
+                       android:src="@drawable/grayled" />
+
+               <ImageView
+                       android:id="@+id/apogee_greenled"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_toRightOf="@id/apogee_redled"
+                       android:contentDescription="@string/apogee_voltage_label"
+                       android:paddingRight="5dp"
+                       android:src="@drawable/grayled" />
+
+               <TextView
+                       android:id="@+id/apogee_voltage_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_toRightOf="@id/apogee_greenled"
+                       android:text="@string/apogee_voltage_label" />
+
+               <TextView
+                       android:id="@+id/apogee_voltage_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/apogee_voltage_label"
+                       android:layout_toRightOf="@id/apogee_greenled"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <ImageView
+                       android:id="@+id/main_redled"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:contentDescription="@string/main_voltage_label"
+                       android:src="@drawable/grayled" />
+
+               <ImageView
+                       android:id="@+id/main_greenled"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_toRightOf="@id/main_redled"
+                       android:contentDescription="@string/main_voltage_label"
+                       android:paddingRight="5dp"
+                       android:src="@drawable/grayled" />
+
+               <TextView
+                       android:id="@+id/main_voltage_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_toRightOf="@id/main_greenled"
+                       android:text="@string/main_voltage_label" />
+
+               <TextView
+                       android:id="@+id/main_voltage_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/main_voltage_label"
+                       android:layout_toRightOf="@id/main_greenled"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+</LinearLayout>
diff --git a/altosdroid/res/layout/tab_landed.xml b/altosdroid/res/layout/tab_landed.xml
deleted file mode 100644 (file)
index f27baa9..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright © 2013 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.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-       android:layout_width="fill_parent"
-       android:layout_height="wrap_content"
-       android:orientation="vertical" >
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content" >
-
-               <TextView
-                       android:id="@+id/bearing_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/bearing_label" />
-
-               <TextView
-                       android:id="@+id/bearing_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@+id/bearing_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/distance_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/distance_label" />
-
-               <TextView
-                       android:id="@+id/distance_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@+id/distance_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/target_lat_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/target_latitude_label" />
-
-               <TextView
-                       android:id="@+id/target_lat_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/target_lat_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/target_lon_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/target_longitude_label" />
-
-               <TextView
-                       android:id="@+id/target_lon_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/target_lon_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/receiver_lat_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/receiver_latitude_label" />
-
-               <TextView
-                       android:id="@+id/receiver_lat_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/receiver_lat_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/receiver_lon_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/receiver_longitude_label" />
-
-               <TextView
-                       android:id="@+id/receiver_lon_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/receiver_lon_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/max_height_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/max_height_label" />
-
-               <TextView
-                       android:id="@+id/max_height_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/max_height_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/max_speed_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/max_speed_label" />
-
-               <TextView
-                       android:id="@+id/max_speed_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/max_speed_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-       <RelativeLayout
-               android:layout_width="wrap_content"
-               android:layout_height="wrap_content"
-               android:paddingTop="5dp" >
-
-               <TextView
-                       android:id="@+id/max_accel_label"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:text="@string/max_accel_label" />
-
-               <TextView
-                       android:id="@+id/max_accel_value"
-                       android:layout_width="wrap_content"
-                       android:layout_height="wrap_content"
-                       android:layout_alignParentRight="true"
-                       android:layout_below="@id/max_accel_label"
-                       android:text=""
-                       android:textAppearance="?android:attr/textAppearanceSmall" />
-       </RelativeLayout>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/altosdroid/res/layout/tab_recover.xml b/altosdroid/res/layout/tab_recover.xml
new file mode 100644 (file)
index 0000000..f27baa9
--- /dev/null
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright © 2013 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+       android:layout_width="fill_parent"
+       android:layout_height="wrap_content"
+       android:orientation="vertical" >
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content" >
+
+               <TextView
+                       android:id="@+id/bearing_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/bearing_label" />
+
+               <TextView
+                       android:id="@+id/bearing_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@+id/bearing_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/distance_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/distance_label" />
+
+               <TextView
+                       android:id="@+id/distance_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@+id/distance_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/target_lat_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/target_latitude_label" />
+
+               <TextView
+                       android:id="@+id/target_lat_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/target_lat_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/target_lon_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/target_longitude_label" />
+
+               <TextView
+                       android:id="@+id/target_lon_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/target_lon_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/receiver_lat_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/receiver_latitude_label" />
+
+               <TextView
+                       android:id="@+id/receiver_lat_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/receiver_lat_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/receiver_lon_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/receiver_longitude_label" />
+
+               <TextView
+                       android:id="@+id/receiver_lon_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/receiver_lon_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/max_height_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/max_height_label" />
+
+               <TextView
+                       android:id="@+id/max_height_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/max_height_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/max_speed_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/max_speed_label" />
+
+               <TextView
+                       android:id="@+id/max_speed_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/max_speed_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+       <RelativeLayout
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:paddingTop="5dp" >
+
+               <TextView
+                       android:id="@+id/max_accel_label"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:text="@string/max_accel_label" />
+
+               <TextView
+                       android:id="@+id/max_accel_value"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_alignParentRight="true"
+                       android:layout_below="@id/max_accel_label"
+                       android:text=""
+                       android:textAppearance="?android:attr/textAppearanceSmall" />
+       </RelativeLayout>
+
+</LinearLayout>
\ No newline at end of file
index c5da6d0e6b5d13bbd48f2ee853452f7c8d5cb646..6cd9463afbc056f39e7cde3561134a943bd75933 100644 (file)
@@ -399,9 +399,9 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener {
                                if (prev_locked != locked) {
                                        String currentTab = mTabHost.getCurrentTabTag();
                                        if (locked) {
-                                               if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("descent");
+                                               if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("flight");
                                        } else {
-                                               if (currentTab.equals("descent")) mTabHost.setCurrentTabByTag("pad");
+                                               if (currentTab.equals("flight")) mTabHost.setCurrentTabByTag("pad");
                                        }
                                }
                        } else {
@@ -409,16 +409,13 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener {
                                        String currentTab = mTabHost.getCurrentTabTag();
                                        switch (state.state) {
                                        case AltosLib.ao_flight_boost:
-                                               if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("ascent");
-                                               break;
-                                       case AltosLib.ao_flight_drogue:
-                                               if (currentTab.equals("ascent")) mTabHost.setCurrentTabByTag("descent");
+                                               if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("flight");
                                                break;
                                        case AltosLib.ao_flight_landed:
-                                               if (currentTab.equals("descent")) mTabHost.setCurrentTabByTag("landed");
+                                               if (currentTab.equals("flight")) mTabHost.setCurrentTabByTag("recover");
                                                break;
                                        case AltosLib.ao_flight_stateless:
-                                               if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("descent");
+                                               if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("flight");
                                                break;
                                        }
                                }
@@ -539,9 +536,8 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener {
                mTabsAdapter = new TabsAdapter(this, mTabHost, mViewPager);
 
                mTabsAdapter.addTab(mTabHost.newTabSpec("pad").setIndicator(create_tab_view("Pad")), TabPad.class, null);
-               mTabsAdapter.addTab(mTabHost.newTabSpec("ascent").setIndicator(create_tab_view("Ascent")), TabAscent.class, null);
-               mTabsAdapter.addTab(mTabHost.newTabSpec("descent").setIndicator(create_tab_view("Descent")), TabDescent.class, null);
-               mTabsAdapter.addTab(mTabHost.newTabSpec("landed").setIndicator(create_tab_view("Landed")), TabLanded.class, null);
+               mTabsAdapter.addTab(mTabHost.newTabSpec("flight").setIndicator(create_tab_view("Flight")), TabFlight.class, null);
+               mTabsAdapter.addTab(mTabHost.newTabSpec("recover").setIndicator(create_tab_view("Recover")), TabRecover.class, null);
                mTabsAdapter.addTab(mTabHost.newTabSpec("map").setIndicator(create_tab_view("Map")), TabMap.class, null);
 
                // Display the Version
index 2f2f74ce196888189f13824482dccd920fc60ed7..1968edaef4bf56b2d455c5c2167113fb6537f94d 100644 (file)
@@ -163,6 +163,9 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe
        public void set_zoom_label(String label) {
        }
 
+       public void select_object(AltosLatLon latlon) {
+       }
+
        public void debug(String format, Object ... arguments) {
                AltosDebug.debug(format, arguments);
        }
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java
deleted file mode 100644 (file)
index afce937..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright © 2013 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;
-
-import org.altusmetrum.altoslib_7.*;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-import android.location.Location;
-
-public class TabAscent extends AltosDroidTab {
-       private TextView mHeightView;
-       private TextView mMaxHeightView;
-       private TextView mSpeedView;
-       private TextView mMaxSpeedView;
-       private TextView mAccelView;
-       private TextView mMaxAccelView;
-       private TextView mLatitudeView;
-       private TextView mLongitudeView;
-       private TextView mApogeeVoltageView;
-       private GoNoGoLights mApogeeLights;
-       private TextView mMainVoltageView;
-       private GoNoGoLights mMainLights;
-
-       @Override
-       public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-               View v = inflater.inflate(R.layout.tab_ascent, container, false);
-
-               mHeightView    = (TextView) v.findViewById(R.id.height_value);
-               mMaxHeightView = (TextView) v.findViewById(R.id.max_height_value);
-               mSpeedView     = (TextView) v.findViewById(R.id.speed_value);
-               mMaxSpeedView  = (TextView) v.findViewById(R.id.max_speed_value);
-               mAccelView     = (TextView) v.findViewById(R.id.accel_value);
-               mMaxAccelView  = (TextView) v.findViewById(R.id.max_accel_value);
-               mLatitudeView  = (TextView) v.findViewById(R.id.lat_value);
-               mLongitudeView = (TextView) v.findViewById(R.id.lon_value);
-
-               mApogeeVoltageView = (TextView) v.findViewById(R.id.apogee_voltage_value);
-               mApogeeLights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled),
-                                                (ImageView) v.findViewById(R.id.apogee_greenled),
-                                                getResources());
-
-               mMainVoltageView = (TextView) v.findViewById(R.id.main_voltage_value);
-               mMainLights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled),
-                                              (ImageView) v.findViewById(R.id.main_greenled),
-                                              getResources());
-
-               return v;
-       }
-
-       public String tab_name() {
-               return "ascent";
-       }
-
-       public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
-               if (state != null) {
-                       set_value(mHeightView, AltosConvert.height, 6, state.height());
-                       set_value(mHeightView, AltosConvert.height, 6, state.height());
-                       set_value(mMaxHeightView, AltosConvert.height, 6, state.max_height());
-                       set_value(mSpeedView, AltosConvert.speed, 6, state.speed());
-                       set_value(mMaxSpeedView, AltosConvert.speed, 6, state.max_speed());
-                       set_value(mAccelView, AltosConvert.accel, 6, state.acceleration());
-                       set_value(mMaxAccelView, AltosConvert.accel, 6, state.max_acceleration());
-
-                       if (state.gps != null) {
-                               mLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S"));
-                               mLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W"));
-                       } else {
-                               mLatitudeView.setText("");
-                               mLongitudeView.setText("");
-                       }
-
-                       mApogeeVoltageView.setText(AltosDroid.number("%4.2f V", state.apogee_voltage));
-                       mApogeeLights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING);
-
-                       mMainVoltageView.setText(AltosDroid.number("%4.2f V", state.main_voltage));
-                       mMainLights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING);
-               }
-       }
-}
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java
deleted file mode 100644 (file)
index 3429ee7..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright © 2013 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;
-
-import org.altusmetrum.altoslib_7.*;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-import android.location.Location;
-
-public class TabDescent extends AltosDroidTab {
-       private TextView mSpeedView;
-       private TextView mHeightView;
-       private TextView mElevationView;
-       private TextView mRangeView;
-       private TextView mBearingView;
-       private TextView mCompassView;
-       private TextView mDistanceView;
-       private TextView mLatitudeView;
-       private TextView mLongitudeView;
-       private TextView mApogeeVoltageView;
-       private GoNoGoLights mApogeeLights;
-       private TextView mMainVoltageView;
-       private GoNoGoLights mMainLights;
-
-       @Override
-       public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-               View v = inflater.inflate(R.layout.tab_descent, container, false);
-
-               mSpeedView     = (TextView) v.findViewById(R.id.speed_value);
-               mHeightView    = (TextView) v.findViewById(R.id.height_value);
-               mElevationView = (TextView) v.findViewById(R.id.elevation_value);
-               mRangeView     = (TextView) v.findViewById(R.id.range_value);
-               mBearingView   = (TextView) v.findViewById(R.id.bearing_value);
-               mCompassView   = (TextView) v.findViewById(R.id.compass_value);
-               mDistanceView  = (TextView) v.findViewById(R.id.distance_value);
-               mLatitudeView  = (TextView) v.findViewById(R.id.lat_value);
-               mLongitudeView = (TextView) v.findViewById(R.id.lon_value);
-
-               mApogeeVoltageView = (TextView) v.findViewById(R.id.apogee_voltage_value);
-               mApogeeLights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled),
-                                                (ImageView) v.findViewById(R.id.apogee_greenled),
-                                                getResources());
-
-               mMainVoltageView = (TextView) v.findViewById(R.id.main_voltage_value);
-               mMainLights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled),
-                                              (ImageView) v.findViewById(R.id.main_greenled),
-                                              getResources());
-
-               return v;
-       }
-
-       public String tab_name() { return "descent"; }
-
-       public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
-               if (state != null) {
-                       set_value(mSpeedView, AltosConvert.speed, 6, state.speed());
-                       set_value(mHeightView, AltosConvert.height, 6, state.height());
-                       if (from_receiver != null) {
-                               mElevationView.setText(AltosDroid.number("%3.0f°", from_receiver.elevation));
-                               set_value(mRangeView, AltosConvert.distance, 6, from_receiver.range);
-                               mBearingView.setText(AltosDroid.number("%3.0f°", from_receiver.bearing));
-                               mCompassView.setText(from_receiver.bearing_words(AltosGreatCircle.BEARING_LONG));
-                               set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance);
-                       } else { 
-                               mElevationView.setText("<unknown>");
-                               mRangeView.setText("<unknown>");
-                               mBearingView.setText("<unknown>");
-                               mCompassView.setText("<unknown>");
-                               mDistanceView.setText("<unknown>");
-                       }
-                       if (state.gps != null) {
-                               mLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S"));
-                               mLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W"));
-                       }
-
-                       mApogeeVoltageView.setText(AltosDroid.number("%4.2f V", state.apogee_voltage));
-                       mApogeeLights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING);
-
-                       mMainVoltageView.setText(AltosDroid.number("%4.2f V", state.main_voltage));
-                       mMainLights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING);
-               }
-       }
-
-}
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java
new file mode 100644 (file)
index 0000000..e1fc737
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright © 2013 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;
+
+import org.altusmetrum.altoslib_7.*;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.location.Location;
+
+public class TabFlight extends AltosDroidTab {
+       private TextView speed_view;
+       private TextView height_view;
+       private TextView max_speed_view;
+       private TextView max_height_view;
+       private TextView elevation_view;
+       private TextView range_view;
+       private TextView bearing_view;
+       private TextView compass_view;
+       private TextView distance_view;
+       private TextView latitude_view;
+       private TextView longitude_view;
+       private TextView apogee_voltage_view;
+       private TextView apogee_voltage_label;
+       private GoNoGoLights apogee_lights;
+       private TextView main_voltage_view;
+       private TextView main_voltage_label;
+       private GoNoGoLights main_lights;
+
+       @Override
+       public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+               View v = inflater.inflate(R.layout.tab_flight, container, false);
+
+               speed_view     = (TextView) v.findViewById(R.id.speed_value);
+               height_view    = (TextView) v.findViewById(R.id.height_value);
+               max_speed_view = (TextView) v.findViewById(R.id.max_speed_value);
+               max_height_view= (TextView) v.findViewById(R.id.max_height_value);
+               elevation_view = (TextView) v.findViewById(R.id.elevation_value);
+               range_view     = (TextView) v.findViewById(R.id.range_value);
+               bearing_view   = (TextView) v.findViewById(R.id.bearing_value);
+               compass_view   = (TextView) v.findViewById(R.id.compass_value);
+               distance_view  = (TextView) v.findViewById(R.id.distance_value);
+               latitude_view  = (TextView) v.findViewById(R.id.lat_value);
+               longitude_view = (TextView) v.findViewById(R.id.lon_value);
+
+               apogee_voltage_view = (TextView) v.findViewById(R.id.apogee_voltage_value);
+               apogee_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled),
+                                                (ImageView) v.findViewById(R.id.apogee_greenled),
+                                                getResources());
+               apogee_voltage_label = (TextView) v.findViewById(R.id.apogee_voltage_label);
+
+               main_voltage_view = (TextView) v.findViewById(R.id.main_voltage_value);
+               main_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled),
+                                              (ImageView) v.findViewById(R.id.main_greenled),
+                                              getResources());
+               main_voltage_label = (TextView) v.findViewById(R.id.main_voltage_label);
+
+               return v;
+       }
+
+       public String tab_name() { return "flight"; }
+
+       public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
+               if (state != null) {
+                       set_value(speed_view, AltosConvert.speed, 6, state.speed());
+                       set_value(height_view, AltosConvert.height, 6, state.height());
+                       set_value(max_speed_view, AltosConvert.speed, 6, state.max_speed());
+                       set_value(max_height_view, AltosConvert.speed, 6, state.max_height());
+                       if (from_receiver != null) {
+                               elevation_view.setText(AltosDroid.number("%3.0f°", from_receiver.elevation));
+                               set_value(range_view, AltosConvert.distance, 6, from_receiver.range);
+                               bearing_view.setText(AltosDroid.number("%3.0f°", from_receiver.bearing));
+                               compass_view.setText(from_receiver.bearing_words(AltosGreatCircle.BEARING_LONG));
+                               set_value(distance_view, AltosConvert.distance, 6, from_receiver.distance);
+                       } else { 
+                               elevation_view.setText("<unknown>");
+                               range_view.setText("<unknown>");
+                               bearing_view.setText("<unknown>");
+                               compass_view.setText("<unknown>");
+                               distance_view.setText("<unknown>");
+                       }
+                       if (state.gps != null) {
+                               latitude_view.setText(AltosDroid.pos(state.gps.lat, "N", "S"));
+                               longitude_view.setText(AltosDroid.pos(state.gps.lon, "E", "W"));
+                       }
+
+                       if (state.apogee_voltage == AltosLib.MISSING) {
+                               apogee_voltage_view.setVisibility(View.GONE);
+                               apogee_voltage_label.setVisibility(View.GONE);
+                               apogee_lights.hide();
+                       } else {
+                               apogee_voltage_view.setText(AltosDroid.number("%4.2f V", state.apogee_voltage));
+                               apogee_voltage_view.setVisibility(View.VISIBLE);
+                               apogee_voltage_label.setVisibility(View.VISIBLE);
+                               apogee_lights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING);
+                               apogee_lights.show();
+                       }
+
+                       if (state.main_voltage == AltosLib.MISSING) {
+                               main_voltage_view.setVisibility(View.GONE);
+                               main_voltage_label.setVisibility(View.GONE);
+                               main_lights.hide();
+                       } else {
+                               main_voltage_view.setText(AltosDroid.number("%4.2f V", state.main_voltage));
+                               main_voltage_view.setVisibility(View.VISIBLE);
+                               main_voltage_label.setVisibility(View.VISIBLE);
+                               main_lights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING);
+                               main_lights.show();
+                       }
+               }
+       }
+
+}
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java
deleted file mode 100644 (file)
index dd3f938..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright © 2013 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;
-
-import org.altusmetrum.altoslib_7.*;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-import android.location.Location;
-
-public class TabLanded extends AltosDroidTab {
-       private TextView mBearingView;
-       private TextView mDistanceView;
-       private TextView mTargetLatitudeView;
-       private TextView mTargetLongitudeView;
-       private TextView mReceiverLatitudeView;
-       private TextView mReceiverLongitudeView;
-       private TextView mMaxHeightView;
-       private TextView mMaxSpeedView;
-       private TextView mMaxAccelView;
-
-       @Override
-       public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
-               View v = inflater.inflate(R.layout.tab_landed, container, false);
-
-               mBearingView   = (TextView) v.findViewById(R.id.bearing_value);
-               mDistanceView  = (TextView) v.findViewById(R.id.distance_value);
-               mTargetLatitudeView  = (TextView) v.findViewById(R.id.target_lat_value);
-               mTargetLongitudeView = (TextView) v.findViewById(R.id.target_lon_value);
-               mReceiverLatitudeView  = (TextView) v.findViewById(R.id.receiver_lat_value);
-               mReceiverLongitudeView = (TextView) v.findViewById(R.id.receiver_lon_value);
-               mMaxHeightView = (TextView) v.findViewById(R.id.max_height_value);
-               mMaxSpeedView  = (TextView) v.findViewById(R.id.max_speed_value);
-               mMaxAccelView  = (TextView) v.findViewById(R.id.max_accel_value);
-
-               return v;
-       }
-
-       public String tab_name() { return "landed"; }
-
-       public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
-               if (from_receiver != null) {
-                       mBearingView.setText(String.format("%3.0f°", from_receiver.bearing));
-                       set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance);
-               }
-               if (state != null && state.gps != null) {
-                       mTargetLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S"));
-                       mTargetLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W"));
-               }
-
-               if (receiver != null) {
-                       mReceiverLatitudeView.setText(AltosDroid.pos(receiver.getLatitude(), "N", "S"));
-                       mReceiverLongitudeView.setText(AltosDroid.pos(receiver.getLongitude(), "E", "W"));
-               }
-
-               if (state != null) {
-                       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());
-               }
-       }
-}
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java
new file mode 100644 (file)
index 0000000..0ab20f5
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright © 2013 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;
+
+import org.altusmetrum.altoslib_7.*;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+import android.location.Location;
+
+public class TabRecover extends AltosDroidTab {
+       private TextView mBearingView;
+       private TextView mDistanceView;
+       private TextView mTargetLatitudeView;
+       private TextView mTargetLongitudeView;
+       private TextView mReceiverLatitudeView;
+       private TextView mReceiverLongitudeView;
+       private TextView mMaxHeightView;
+       private TextView mMaxSpeedView;
+       private TextView mMaxAccelView;
+
+       @Override
+       public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+               View v = inflater.inflate(R.layout.tab_recover, container, false);
+
+               mBearingView   = (TextView) v.findViewById(R.id.bearing_value);
+               mDistanceView  = (TextView) v.findViewById(R.id.distance_value);
+               mTargetLatitudeView  = (TextView) v.findViewById(R.id.target_lat_value);
+               mTargetLongitudeView = (TextView) v.findViewById(R.id.target_lon_value);
+               mReceiverLatitudeView  = (TextView) v.findViewById(R.id.receiver_lat_value);
+               mReceiverLongitudeView = (TextView) v.findViewById(R.id.receiver_lon_value);
+               mMaxHeightView = (TextView) v.findViewById(R.id.max_height_value);
+               mMaxSpeedView  = (TextView) v.findViewById(R.id.max_speed_value);
+               mMaxAccelView  = (TextView) v.findViewById(R.id.max_accel_value);
+
+               return v;
+       }
+
+       public String tab_name() { return "recover"; }
+
+       public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) {
+               if (from_receiver != null) {
+                       mBearingView.setText(String.format("%3.0f°", from_receiver.bearing));
+                       set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance);
+               }
+               if (state != null && state.gps != null) {
+                       mTargetLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S"));
+                       mTargetLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W"));
+               }
+
+               if (receiver != null) {
+                       mReceiverLatitudeView.setText(AltosDroid.pos(receiver.getLatitude(), "N", "S"));
+                       mReceiverLongitudeView.setText(AltosDroid.pos(receiver.getLongitude(), "E", "W"));
+               }
+
+               if (state != null) {
+                       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());
+               }
+       }
+}