summaryrefslogtreecommitdiff
path: root/altosdroid/res
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-06-21 09:37:05 -0700
committerKeith Packard <keithp@keithp.com>2015-06-22 21:04:43 -0700
commit9af72a2e629779833ff1787bbfc2ddc8b9d88bba (patch)
tree32c475d55a17dc6c02b29edd1e21d3f352489522 /altosdroid/res
parent4fbe9d5a1f56178a737ede6b31e8d01a02a7543f (diff)
altosdroid: Show receiver battery voltage in the 'pad' view
Helpful to determine when the receiver battery is getting low Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosdroid/res')
-rw-r--r--altosdroid/res/layout/tab_pad.xml39
-rw-r--r--altosdroid/res/values/strings.xml1
2 files changed, 39 insertions, 1 deletions
diff --git a/altosdroid/res/layout/tab_pad.xml b/altosdroid/res/layout/tab_pad.xml
index 38e61f83..380eab91 100644
--- a/altosdroid/res/layout/tab_pad.xml
+++ b/altosdroid/res/layout/tab_pad.xml
@@ -60,6 +60,43 @@
<RelativeLayout
android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+
+ <ImageView
+ android:id="@+id/receiver_redled"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="@string/receiver_voltage_label"
+ android:src="@drawable/grayled" />
+
+ <ImageView
+ android:id="@+id/receiver_greenled"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/receiver_redled"
+ android:contentDescription="@string/receiver_voltage_label"
+ android:paddingRight="5dp"
+ android:src="@drawable/grayled" />
+
+ <TextView
+ android:id="@+id/receiver_voltage_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/receiver_greenled"
+ android:text="@string/receiver_voltage_label" />
+
+ <TextView
+ android:id="@+id/receiver_voltage_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/receiver_voltage_label"
+ android:layout_toRightOf="@id/receiver_greenled"
+ android:text=""
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp" >
@@ -317,4 +354,4 @@
android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/altosdroid/res/values/strings.xml b/altosdroid/res/values/strings.xml
index 79a77ba9..0c012819 100644
--- a/altosdroid/res/values/strings.xml
+++ b/altosdroid/res/values/strings.xml
@@ -76,6 +76,7 @@
<string name="max_speed_label">Max Speed</string>
<string name="max_accel_label">Max Accel</string>
<string name="battery_voltage_label">Battery Voltage</string>
+ <string name="receiver_voltage_label">Receiver Battery</string>
<string name="apogee_voltage_label">Apogee Igniter Voltage</string>
<string name="main_voltage_label">Main Igniter Voltage</string>
<string name="logging_label">On-board Data Logging</string>