From 717eb6ba585d112ed1b42d0ad6004a9cc79cb05d Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sun, 24 Sep 2017 22:44:18 +0200 Subject: [PATCH] Amazfit Bip: Whitelist fw 0.0.8.97/.98, fix detection for newer alm and cep files --- .../devices/amazfitbip/AmazfitBipFirmwareInfo.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipFirmwareInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipFirmwareInfo.java index 9370d771..5874d021 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipFirmwareInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipFirmwareInfo.java @@ -41,12 +41,12 @@ public class AmazfitBipFirmwareInfo extends Mi2FirmwareInfo { 0x48, 0x4d, 0x52, 0x45, 0x53 }; - private static final byte[] GPS_ALMANAC_HEADER = new byte[]{ // probably wrong, we only have one file - (byte) 0xa0, (byte) 0x80, 0x08, 0x00, (byte) 0x8b, 0x07, (byte) 0x87, 0x13 + private static final byte[] GPS_ALMANAC_HEADER = new byte[]{ // probably wrong + (byte) 0xa0, (byte) 0x80, 0x08, 0x00, (byte) 0x8b, 0x07 }; - private static final byte[] GPS_CEP_HEADER = new byte[]{ // probably wrong, we only have one file - 0x2a, 0x12, (byte) 0xa0, 0x02, (byte) 0xc4, (byte) 0xe1, 0x00, 0x00 + private static final byte[] GPS_CEP_HEADER = new byte[]{ // probably wrong + 0x2a, 0x12, (byte) 0xa0, 0x02 }; static { @@ -54,11 +54,13 @@ public class AmazfitBipFirmwareInfo extends Mi2FirmwareInfo { crcToVersion.put(25257, "0.0.8.74"); crcToVersion.put(57724, "0.0.8.88"); crcToVersion.put(27668, "0.0.8.96"); + crcToVersion.put(60173, "0.0.8.97"); + crcToVersion.put(3462, "0.0.8.98"); // resources crcToVersion.put(12586, "RES 0.0.8.74"); crcToVersion.put(34068, "RES 0.0.8.88"); - crcToVersion.put(59839, "RES 0.0.8.96"); + crcToVersion.put(59839, "RES 0.0.8.96-98"); // gps crcToVersion.put(61520, "GPS 9367,8f79a91,0,0,");