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:
parent
e85d959bf5
commit
3488f0d2a2
@ -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>
|
10
androidgcs/res/xml/controller_preferences.xml
Normal file
10
androidgcs/res/xml/controller_preferences.xml
Normal 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>
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user