1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-29 12:05:53 +01:00

Sync with Gadgetbridge

This commit is contained in:
mamutcho 2019-12-15 19:40:20 +02:00
parent 0d8428437c
commit 48ed724256
2 changed files with 13 additions and 5 deletions

View File

@ -730,8 +730,18 @@ public class WatchXPlusDeviceSupport extends AbstractBTLEDeviceSupport {
@Override
public void onFetchRecordedData(int dataTypes) {
TransactionBuilder builder;
// get battery state
try {
builder = performInitialized("getBatteryInfo");
builder.write(getCharacteristic(WatchXPlusConstants.UUID_CHARACTERISTIC_WRITE),
buildCommand(WatchXPlusConstants.CMD_BATTERY_INFO,
WatchXPlusConstants.READ_VALUE));
builder.queue(getQueue());
} catch (IOException e) {
LOG.warn("Unable to retrieve battery data", e);
}
try {
builder = performInitialized("fetchData");

View File

@ -108,14 +108,12 @@
android:inputType="number"
android:key="pref_wxp_bp_calibration_low"
android:defaultValue="80"
android:title="@string/pref_wxp_bp_calibration_low"
android:summary="@string/pref_rtl_max_line_length_summary"/>
android:title="@string/pref_wxp_bp_calibration_low" />
<EditTextPreference
android:inputType="number"
android:key="pref_wxp_bp_calibration_high"
android:defaultValue="130"
android:title="@string/pref_wxp_bp_calibration_high"
android:summary="@string/pref_rtl_max_line_length_summary"/>
android:title="@string/pref_wxp_bp_calibration_high" />
<ListPreference
android:defaultValue="1"
android:title="@string/prefs_wxp_button_bp_calibration"