1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

AndroidGCS Controllre: Add an option for mode 1 or mode 2

This commit is contained in:
James Cotton 2012-08-30 10:36:46 -05:00
parent e85d959bf5
commit 3488f0d2a2
3 changed files with 19 additions and 0 deletions

View File

@ -14,4 +14,12 @@
<item>3</item>
<item>4</item>
</string-array>
<string-array name="controllerTypeArray">
<item>Mode 1</item>
<item>Mode 2</item>
</string-array>
<string-array name="controllerTypeValues">
<item>0</item>
<item>1</item>
</string-array>
</resources>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory android:title="Controller Settings">
<ListPreference android:title="Controller Mode"
android:key="controller_type" android:summary="Select whether you want the virtual controller to use mode 1 or mode 2 convention"
android:defaultValue="Mode 1"
android:entries="@array/controllerTypeArray"
android:entryValues="@array/controllerTypeValues"/>
</PreferenceCategory>
</PreferenceScreen>

View File

@ -42,6 +42,7 @@ public class Preferences extends PreferenceActivity {
super.onCreate(savedInstanceState);
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.preferences);
addPreferencesFromResource(R.xml.controller_preferences);
}
}
}