BangleJSDeviceSupport: fix setUpdateState

This commit is contained in:
Thomas Kuehne
2025-06-22 14:46:50 +02:00
committed by José Rebelo
parent c9a9ae8ad0
commit 280f4fc61d
@@ -361,8 +361,7 @@ public class BangleJSDeviceSupport extends AbstractBTLESingleDeviceSupport {
sleepAsAndroidSender = new SleepAsAndroidSender(gbDevice); sleepAsAndroidSender = new SleepAsAndroidSender(gbDevice);
} }
gbDevice.setState(GBDevice.State.INITIALIZING); builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZING, getContext());
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
rxCharacteristic = getCharacteristic(BangleJSConstants.UUID_CHARACTERISTIC_NORDIC_UART_RX); rxCharacteristic = getCharacteristic(BangleJSConstants.UUID_CHARACTERISTIC_NORDIC_UART_RX);
txCharacteristic = getCharacteristic(BangleJSConstants.UUID_CHARACTERISTIC_NORDIC_UART_TX); txCharacteristic = getCharacteristic(BangleJSConstants.UUID_CHARACTERISTIC_NORDIC_UART_TX);
@@ -389,8 +388,7 @@ public class BangleJSDeviceSupport extends AbstractBTLESingleDeviceSupport {
//sendSettings(builder); //sendSettings(builder);
// get version // get version
gbDevice.setState(GBDevice.State.INITIALIZED); builder.setUpdateState(gbDevice, GBDevice.State.INITIALIZED, getContext());
gbDevice.sendDeviceUpdateIntent(getContext(), GBDevice.DeviceUpdateSubject.DEVICE_STATE);
if (getDevice().getFirmwareVersion() == null) { if (getDevice().getFirmwareVersion() == null) {
getDevice().setFirmwareVersion("N/A"); getDevice().setFirmwareVersion("N/A");
getDevice().setFirmwareVersion2("N/A"); getDevice().setFirmwareVersion2("N/A");