jyou: fix setUpdateState

This commit is contained in:
Thomas Kuehne
2025-06-22 14:49:27 +02:00
committed by José Rebelo
parent d48bea3003
commit cc41bcac2a
2 changed files with 4 additions and 8 deletions
@@ -102,8 +102,7 @@ public class BFH16DeviceSupport extends AbstractBTLESingleDeviceSupport {
protected TransactionBuilder initializeDevice(TransactionBuilder builder) {
LOG.info("Initializing BFH16");
gbDevice.setState(GBDevice.State.INITIALIZING);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZING, getContext());
measureCharacteristic = getCharacteristic(BFH16Constants.BFH16_SERVICE1_NOTIFY);
ctrlCharacteristic = getCharacteristic(BFH16Constants.BFH16_SERVICE1_WRITE);
@@ -113,8 +112,7 @@ public class BFH16DeviceSupport extends AbstractBTLESingleDeviceSupport {
syncSettings(builder);
gbDevice.setState(GBDevice.State.INITIALIZED);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZED, getContext());
LOG.info("Initialization BFH16 Done");
@@ -63,8 +63,7 @@ public class JYouSupport extends AbstractBTLESingleDeviceSupport {
protected TransactionBuilder initializeDevice(TransactionBuilder builder) {
logger.info("Initializing");
gbDevice.setState(GBDevice.State.INITIALIZING);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZING, getContext());
BluetoothGattCharacteristic measureCharacteristic = getCharacteristic(JYouConstants.UUID_CHARACTERISTIC_MEASURE);
ctrlCharacteristic = getCharacteristic(JYouConstants.UUID_CHARACTERISTIC_CONTROL);
@@ -74,8 +73,7 @@ public class JYouSupport extends AbstractBTLESingleDeviceSupport {
syncSettings(builder);
gbDevice.setState(GBDevice.State.INITIALIZED);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZED, getContext());
logger.info("Initialization Done");