From 686ed312d633e40c3b0fef8af1fc32cc08991435 Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Sun, 19 Apr 2015 22:23:53 +0200 Subject: [PATCH] #15 properly return firmware version --- .../freeyourgadget/gadgetbridge/miband/MiBandSupport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java index d8040e2c2..10e18d5da 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java @@ -180,7 +180,8 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport { private void handleDeviceInfo(byte[] value, int status) { if (status == BluetoothGatt.GATT_SUCCESS) { - getDevice().setFirmwareVersion(value.length + ":" + new String(value)); + DeviceInfo info = new DeviceInfo(value); + getDevice().setFirmwareVersion(info.getFirmwareVersion()); getDevice().sendDeviceUpdateIntent(getContext()); } }