From c245a33c4882c50d13658e3405f8fd67c732bcf6 Mon Sep 17 00:00:00 2001 From: Aleksander Nowakowski Date: Mon, 2 Mar 2015 14:25:51 +0100 Subject: [PATCH] Adding units settings to CSC, RSC, HTM. --- app/app.iml | 4 +- app/build.gradle | 4 +- app/src/main/AndroidManifest.xml | 16 ++- .../android/nrftoolbox/FeaturesActivity.java | 6 +- .../android/nrftoolbox/csc/CSCActivity.java | 84 ++++++++++-- .../csc/settings/SettingsFragment.java | 6 + .../android/nrftoolbox/dfu/DfuActivity.java | 2 +- .../android/nrftoolbox/hts/HTSActivity.java | 101 ++++++++++++-- .../android/nrftoolbox/hts/HTSManager.java | 10 +- .../android/nrftoolbox/hts/HTSService.java | 2 +- .../hts/settings/SettingsActivity.java | 50 +++++++ .../hts/settings/SettingsFragment.java | 43 ++++++ .../android/nrftoolbox/rsc/RSCActivity.java | 127 +++++++++++++++--- .../android/nrftoolbox/rsc/RSCManager.java | 10 +- .../rsc/settings/SettingsActivity.java | 50 +++++++ .../rsc/settings/SettingsFragment.java | 45 +++++++ .../res/layout-land/activity_feature_csc.xml | 6 +- .../res/layout-land/activity_feature_hts.xml | 1 + .../res/layout-land/activity_feature_rsc.xml | 6 +- .../activity_feature_csc.xml | 6 +- .../activity_feature_rsc.xml | 6 +- .../main/res/layout/activity_feature_csc.xml | 6 +- .../main/res/layout/activity_feature_hts.xml | 1 + .../main/res/layout/activity_feature_rsc.xml | 6 +- app/src/main/res/menu/settings_and_about.xml | 37 +++++ app/src/main/res/values/strings_csc.xml | 23 +++- app/src/main/res/values/strings_hts.xml | 22 ++- app/src/main/res/values/strings_rsc.xml | 23 +++- app/src/main/res/xml/settings_csc.xml | 22 +-- app/src/main/res/xml/settings_hts.xml | 34 +++++ app/src/main/res/xml/settings_rsc.xml | 34 +++++ 31 files changed, 706 insertions(+), 87 deletions(-) create mode 100644 app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsActivity.java create mode 100644 app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsFragment.java create mode 100644 app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsActivity.java create mode 100644 app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsFragment.java create mode 100644 app/src/main/res/menu/settings_and_about.xml create mode 100644 app/src/main/res/xml/settings_hts.xml create mode 100644 app/src/main/res/xml/settings_rsc.xml diff --git a/app/app.iml b/app/app.iml index 9ec727f7..bbc7e298 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + @@ -9,6 +9,7 @@ + diff --git a/app/build.gradle b/app/build.gradle index 2e44289b..f4685538 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "no.nordicsemi.android.nrftoolbox" minSdkVersion 18 targetSdkVersion 21 - versionCode 27 - versionName "1.11.4" + versionCode 28 + versionName "1.11.5" } buildTypes { release { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e7146ead..b7142251 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -23,8 +23,8 @@ + android:versionCode="28" + android:versionName="1.11.5" > + + + - { private TextView mSpeedView; + private TextView mSpeedUnitView; private TextView mCadenceView; private TextView mDistanceView; private TextView mDistanceUnitView; private TextView mTotalDistanceView; + private TextView mTotalDistanceUnitView; private TextView mGearRatioView; @Override @@ -64,21 +69,53 @@ public class CSCActivity extends BleProfileServiceReadyActivity { gatt.disconnect(); return; } - if (mBatteryCharacteristic != null) { - readBatteryLevel(); - } else { - enableHTIndication(); - } + enableHTIndication(); } else { mCallbacks.onError(ERROR_DISCOVERY_SERVICE, status); } @@ -185,8 +181,6 @@ public class HTSManager implements BleManager { if (characteristic.getUuid().equals(BATTERY_LEVEL_CHARACTERISTIC)) { int batteryValue = characteristic.getValue()[0]; mCallbacks.onBatteryValueReceived(batteryValue); - - enableHTIndication(); } } else if (status == BluetoothGatt.GATT_INSUFFICIENT_AUTHENTICATION) { if (gatt.getDevice().getBondState() != BluetoothDevice.BOND_NONE) { @@ -213,7 +207,7 @@ public class HTSManager implements BleManager { @Override public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) { if (status == BluetoothGatt.GATT_SUCCESS) { - // HT indications has been enabled + readBatteryLevel(); } else if (status == BluetoothGatt.GATT_INSUFFICIENT_AUTHENTICATION) { if (gatt.getDevice().getBondState() == BluetoothDevice.BOND_NONE) { mCallbacks.onBondingRequired(); diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/HTSService.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/HTSService.java index d40a0dd8..430bfc02 100644 --- a/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/HTSService.java +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/HTSService.java @@ -66,7 +66,7 @@ public class HTSService extends BleProfileService implements HTSManagerCallbacks @Override protected BleManager initializeManager() { - return mManager = new HTSManager(); + return mManager = HTSManager.getHTSManager(); } @Override diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsActivity.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsActivity.java new file mode 100644 index 00000000..3c548fce --- /dev/null +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsActivity.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, Nordic Semiconductor + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package no.nordicsemi.android.nrftoolbox.hts.settings; + +import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; +import android.view.MenuItem; + +public class SettingsActivity extends ActionBarActivity { + + @Override + protected void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + // Display the fragment as the main content. + getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit(); + } + + @Override + public boolean onOptionsItemSelected(final MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsFragment.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsFragment.java new file mode 100644 index 00000000..685d53f4 --- /dev/null +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/hts/settings/SettingsFragment.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015, Nordic Semiconductor + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package no.nordicsemi.android.nrftoolbox.hts.settings; + +import android.os.Bundle; +import android.preference.PreferenceFragment; + +import no.nordicsemi.android.nrftoolbox.R; + +public class SettingsFragment extends PreferenceFragment { + public static final String SETTINGS_UNIT = "settings_hts_unit"; + public static final int SETTINGS_UNIT_C = 0; // [C] + public static final int SETTINGS_UNIT_F = 1; // [F] + public static final int SETTINGS_UNIT_K = 2; // [K] + public static final int SETTINGS_UNIT_DEFAULT = SETTINGS_UNIT_C; + + @Override + public void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.settings_hts); + } +} diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/RSCActivity.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/RSCActivity.java index 6d52aab5..eb9a8675 100644 --- a/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/RSCActivity.java +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/RSCActivity.java @@ -25,22 +25,29 @@ package no.nordicsemi.android.nrftoolbox.rsc; import java.util.UUID; import no.nordicsemi.android.nrftoolbox.R; +import no.nordicsemi.android.nrftoolbox.rsc.settings.SettingsFragment; +import no.nordicsemi.android.nrftoolbox.rsc.settings.SettingsActivity; import no.nordicsemi.android.nrftoolbox.profile.BleProfileService; import no.nordicsemi.android.nrftoolbox.profile.BleProfileServiceReadyActivity; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.SharedPreferences; import android.os.Bundle; +import android.preference.PreferenceManager; import android.support.v4.content.LocalBroadcastManager; +import android.view.Menu; import android.widget.TextView; public class RSCActivity extends BleProfileServiceReadyActivity { private TextView mSpeedView; + private TextView mSpeedUnitView; private TextView mCadenceView; private TextView mDistanceView; private TextView mDistanceUnitView; private TextView mTotalDistanceView; + private TextView mTotalDistanceUnitView; private TextView mStridesCountView; private TextView mActivityView; @@ -63,23 +70,55 @@ public class RSCActivity extends BleProfileServiceReadyActivity getServiceClass() { return RSCService.class; @@ -122,28 +178,69 @@ public class RSCActivity extends BleProfileServiceReadyActivity { final boolean tdPreset = (flags & TOTAL_DISTANCE_PRESENT) > 0; final boolean running = (flags & WALKING_OR_RUNNING_STATUS_BITS) > 0; - final float instantaneousSpeed = (float) characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT16, offset) / 256.0f * 3.6f; // 1/256 m/s in km/h + final float instantaneousSpeed = (float) characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT16, offset) / 256.0f; // 1/256 m/s in [m/s] offset += 2; - final int instantaneousCadence = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, offset); + final int instantaneousCadence = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, offset); // [SPM] offset += 1; float instantaneousStrideLength = RSCManagerCallbacks.NOT_AVAILABLE; if (islmPresent) { - instantaneousStrideLength = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT16, offset); + instantaneousStrideLength = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT16, offset); // [cm] offset += 2; } float totalDistance = RSCManagerCallbacks.NOT_AVAILABLE; if (tdPreset) { - totalDistance = (float) characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT32, offset) / 10.0f; - offset += 4; + totalDistance = (float) characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT32, offset) / 10.0f; // 1/10 m in [m] + //offset += 4; } // Notify listener about the new measurement diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsActivity.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsActivity.java new file mode 100644 index 00000000..53a001aa --- /dev/null +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsActivity.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, Nordic Semiconductor + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package no.nordicsemi.android.nrftoolbox.rsc.settings; + +import android.os.Bundle; +import android.support.v7.app.ActionBarActivity; +import android.view.MenuItem; + +public class SettingsActivity extends ActionBarActivity { + + @Override + protected void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + // Display the fragment as the main content. + getFragmentManager().beginTransaction().replace(android.R.id.content, new SettingsFragment()).commit(); + } + + @Override + public boolean onOptionsItemSelected(final MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsFragment.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsFragment.java new file mode 100644 index 00000000..9a0e030b --- /dev/null +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/rsc/settings/SettingsFragment.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2015, Nordic Semiconductor + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package no.nordicsemi.android.nrftoolbox.rsc.settings; + +import android.content.SharedPreferences; +import android.os.Bundle; +import android.preference.PreferenceFragment; +import android.preference.PreferenceScreen; + +import no.nordicsemi.android.nrftoolbox.R; + +public class SettingsFragment extends PreferenceFragment { + public static final String SETTINGS_UNIT = "settings_rsc_unit"; + public static final int SETTINGS_UNIT_M_S = 0; // [m/s] + public static final int SETTINGS_UNIT_KM_H = 1; // [m/s] + public static final int SETTINGS_UNIT_MPH = 2; // [m/s] + public static final int SETTINGS_UNIT_DEFAULT = SETTINGS_UNIT_KM_H; + + @Override + public void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.settings_rsc); + } +} diff --git a/app/src/main/res/layout-land/activity_feature_csc.xml b/app/src/main/res/layout-land/activity_feature_csc.xml index 8dfc641d..547b6a5d 100644 --- a/app/src/main/res/layout-land/activity_feature_csc.xml +++ b/app/src/main/res/layout-land/activity_feature_csc.xml @@ -119,11 +119,12 @@ android:textSize="36sp" /> + android:text="@string/csc_speed_unit_km_h" /> + android:text="@string/csc_total_distance_unit_km" /> + android:text="@string/rsc_speed_unit_km_h" /> + android:text="@string/rsc_total_distance_unit_km" /> + android:text="@string/csc_speed_unit_km_h" /> + android:text="@string/csc_total_distance_unit_km" /> + android:text="@string/rsc_speed_unit_km_h" /> + android:text="@string/rsc_total_distance_unit_km" /> + android:text="@string/csc_speed_unit_km_h" /> + android:text="@string/csc_total_distance_unit_km" /> + android:text="@string/rsc_speed_unit_km_h" /> + android:text="@string/rsc_total_distance_unit_km" /> + + + + + + + diff --git a/app/src/main/res/values/strings_csc.xml b/app/src/main/res/values/strings_csc.xml index 96744efe..d71ff92b 100644 --- a/app/src/main/res/values/strings_csc.xml +++ b/app/src/main/res/values/strings_csc.xml @@ -29,21 +29,25 @@ SPEED AND CADENCE SPEED - km/h + m/s + km/h + mph CADENCE RPM DISTANCE m km + yd + mile TOTAL DISTANCE - km + km + mile GEAR RATIO DEFAULT CSC Disconnect %s is connected. - Wheel size Wheel size Wheel circumference: %s mm @@ -151,6 +155,19 @@ 1282 1272 + + Units + %s + + m/s + km/h + mph + + + 0 + 1 + 2 + CSC (Cycling Speed and Cadence) profile allows you to connect to your bike activity sensor. \nIt reads wheel and crank data if they are supported by the sensor and calculates speed, cadence, total and trip distance and gear ratio. Set up your wheel size in the settings to get correct readings. diff --git a/app/src/main/res/values/strings_hts.xml b/app/src/main/res/values/strings_hts.xml index fe328bfa..13a66bec 100644 --- a/app/src/main/res/values/strings_hts.xml +++ b/app/src/main/res/values/strings_hts.xml @@ -22,15 +22,31 @@ --> HTM + HTM Settings HEALTH THERMOMETER MONITOR -236dp DEFAULT HTM - °C - - Disconnect + °C + °F + °K + + Disconnect %s is connected. + + Units + %s + + Celsius + Fahrenheit + Kelvin + + + 0 + 1 + 2 + HTM (Health Thermometer Monitor) profile allows you to connect to your Health Thermometer sensor. It shows you the temperature value in Celsius. diff --git a/app/src/main/res/values/strings_rsc.xml b/app/src/main/res/values/strings_rsc.xml index 8aec5806..4fa736f0 100644 --- a/app/src/main/res/values/strings_rsc.xml +++ b/app/src/main/res/values/strings_rsc.xml @@ -22,21 +22,27 @@ --> RSC + RSC Settings RUNNING SPEED & CADENCE -192dp SPEED AND CADENCE SPEED - km/h + km/h + km/h + mph CADENCE SPM DISTANCE m km + yd + mile TOTAL DISTANCE - km + km + mile STEPS ACTIVITY @@ -46,6 +52,19 @@ DEFAULT RSC Disconnect %s is connected. + + Units + %s + + m/s + km/h + mph + + + 0 + 1 + 2 + RSC (Running Speed and Cadence) profile allows you to connect to your activity sensor. \nIt reads speed and cadence values from the sensor and calculates trip distance if stride length is supported. Strides count is calculated basing on the cadence and the time. diff --git a/app/src/main/res/xml/settings_csc.xml b/app/src/main/res/xml/settings_csc.xml index 8dd3d543..bea3d6ef 100644 --- a/app/src/main/res/xml/settings_csc.xml +++ b/app/src/main/res/xml/settings_csc.xml @@ -23,13 +23,19 @@ - - - + + + \ No newline at end of file diff --git a/app/src/main/res/xml/settings_hts.xml b/app/src/main/res/xml/settings_hts.xml new file mode 100644 index 00000000..36e1706f --- /dev/null +++ b/app/src/main/res/xml/settings_hts.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/settings_rsc.xml b/app/src/main/res/xml/settings_rsc.xml new file mode 100644 index 00000000..489d4cd7 --- /dev/null +++ b/app/src/main/res/xml/settings_rsc.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file