no1f1: fix setUpdateState

This commit is contained in:
Thomas Kuehne
2025-06-22 14:48:30 +02:00
committed by José Rebelo
parent c700a4c71c
commit 906764ae2a
@@ -77,8 +77,7 @@ public class No1F1Support extends AbstractBTLESingleDeviceSupport {
protected TransactionBuilder initializeDevice(TransactionBuilder builder) {
LOG.info("Initializing");
gbDevice.setState(GBDevice.State.INITIALIZING);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZING, getContext());
measureCharacteristic = getCharacteristic(No1F1Constants.UUID_CHARACTERISTIC_MEASURE);
ctrlCharacteristic = getCharacteristic(No1F1Constants.UUID_CHARACTERISTIC_CONTROL);
@@ -92,8 +91,7 @@ public class No1F1Support extends AbstractBTLESingleDeviceSupport {
builder.write(ctrlCharacteristic, new byte[]{No1F1Constants.CMD_FIRMWARE_VERSION});
builder.write(ctrlCharacteristic, new byte[]{No1F1Constants.CMD_BATTERY});
gbDevice.setState(GBDevice.State.INITIALIZED);
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZED, getContext());
LOG.info("Initialization Done");