1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-28 11:35:48 +01:00

If firmwareRevision is null, use softwareRevision

This commit is contained in:
cpfeiffer 2018-08-06 20:26:39 +02:00
parent 92bd3122f3
commit ec0d62f67b

View File

@ -1319,8 +1319,10 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
LOG.warn("Device info: " + info);
versionCmd.hwVersion = info.getHardwareRevision();
// versionCmd.fwVersion = info.getFirmwareRevision(); // always null
versionCmd.fwVersion = info.getSoftwareRevision();
versionCmd.fwVersion = info.getFirmwareRevision();
if (versionCmd.fwVersion == null) {
versionCmd.fwVersion = info.getSoftwareRevision();
}
if (versionCmd.fwVersion != null && versionCmd.fwVersion.length() > 0 && versionCmd.fwVersion.charAt(0) == 'V') {
versionCmd.fwVersion = versionCmd.fwVersion.substring(1);
}