1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 02:25:50 +01:00

CMF Watch Pro: Fix serial number truncating last 2 digits

This commit is contained in:
José Rebelo 2024-07-21 11:53:05 +01:00
parent ce849579c5
commit 89a3fcc920

View File

@ -296,7 +296,7 @@ public class CmfWatchProSupport extends AbstractBTLEDeviceSupport implements Cmf
LOG.warn("Unexpected serial number payload length: {}, expected {}", payload.length, (payload[0] & 0xff));
return;
}
final String serialNumber = new String(ArrayUtils.subarray(payload, 1, payload.length - 2));
final String serialNumber = new String(ArrayUtils.subarray(payload, 1, payload.length));
LOG.debug("Got serial number: {}", serialNumber);
final GBDeviceEventUpdateDeviceInfo gbDeviceEventUpdateDeviceInfo = new GBDeviceEventUpdateDeviceInfo("SERIAL: ", serialNumber);
evaluateGBDeviceEvent(gbDeviceEventUpdateDeviceInfo);