1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-03-13 04:00:56 +01:00

set notification on step 1

This commit is contained in:
oliexdev 2025-03-03 13:11:00 +01:00
parent 56998292da
commit 477956a214

View File

@ -105,18 +105,14 @@ public class BluetoothQNScale extends BluetoothCommunication {
} catch (NullPointerException e) {
useFirstType = false;
}
// set notification on for custom characteristic 1 (weight, time, and others)
if (useFirstType) {
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, CUSTOM1_MEASUREMENT_CHARACTERISTIC);
} else {
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE_ALTERNATIVE, CUSTOM1_MEASUREMENT_CHARACTERISTIC_ALTERNATIVE);
}
break;
case 1:
// set indication on for weight measurement
// set indication on for weight measurement and for custom characteristic 1 (weight, time, and others)
if (useFirstType) {
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE, CUSTOM1_MEASUREMENT_CHARACTERISTIC);
setIndicationOn(WEIGHT_MEASUREMENT_SERVICE, CUSTOM2_MEASUREMENT_CHARACTERISTIC);
} else {
setNotificationOn(WEIGHT_MEASUREMENT_SERVICE_ALTERNATIVE, CUSTOM1_MEASUREMENT_CHARACTERISTIC_ALTERNATIVE);
}
break;
case 2: