Added cycling speed sensor.

Fixed speed and cadence computation.
Fixed that a sensor change in settings resulted in a disconnect for all connected sensors.
This commit is contained in:
Dennis Guse
2020-04-25 19:59:18 +02:00
parent 3408ea97f4
commit 4893a2b743
10 changed files with 111 additions and 62 deletions
+12 -5
View File
@@ -54,8 +54,8 @@ limitations under the License.
</PreferenceCategory>
<PreferenceCategory
android:title="@string/settings_recording"
android:key="@string/settings_recording_key"
android:title="@string/settings_recording"
app:initialExpandedChildrenCount="4">
<SwitchPreferenceCompat
android:defaultValue="@bool/stats_show_on_lockscreen_while_recording_default"
@@ -119,10 +119,17 @@ limitations under the License.
android:defaultValue="@string/sensor_type_value_none"
android:key="@string/settings_sensor_bluetooth_cycling_cadence_key"
android:title="@string/sensor_state_cadence" />
<!-- <de.dennisguse.opentracks.settings.bluetooth.BluetoothLeCyclingCadenceAndSpeedPreference-->
<!-- android:defaultValue="@string/sensor_type_value_none"-->
<!-- android:key="@string/settings_sensor_bluetooth_cycling_speed_key"-->
<!-- android:title="@string/stats_speed" />-->
<de.dennisguse.opentracks.settings.bluetooth.BluetoothLeCyclingCadenceAndSpeedPreference
android:defaultValue="@string/sensor_type_value_none"
android:key="@string/settings_sensor_bluetooth_cycling_speed_key"
android:title="@string/stats_speed" />
<ListPreference
android:defaultValue="@string/settings_sensor_bluetooth_cycling_speed_wheel_circumference_default"
android:entries="@array/wheel_circumference_options"
android:entryValues="@array/wheel_circumference_values"
android:key="settings_sensor_bluetooth_cycling_speed_wheel_circumference_key"
android:title="@string/settings_sensor_wheel_circumference"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/generic_tracks">