diff --git a/CHANGELOG.md b/CHANGELOG.md index 93c250af3..390d6d44e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ ### Changelog #### Next +* Amazfit Bip: Support flashing newer GPS ALM * Amazfit Bip S: Support music control -* Amazfit Bip S: Support flashing watchfaces +* Amazfit Bip S: Support flashing watchfaces and GPS CEP * Fossil Hybrid HR: Add last notification widget * Try to fix vanishing incoming call information when VoIP call support is enabled diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiFirmwareInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiFirmwareInfo.java index e6e715970..dfefbb82f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiFirmwareInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiFirmwareInfo.java @@ -48,6 +48,14 @@ public abstract class HuamiFirmwareInfo { 0x4e, 0x45, 0x5a, 0x4b }; + public static final byte[] GPS_ALMANAC_HEADER = new byte[]{ // probably wrong + (byte) 0xa0, (byte) 0x80, 0x08, 0x00, (byte) 0x8b + }; + + public static final byte[] GPS_CEP_HEADER = new byte[]{ // probably wrong + 0x2a, 0x12, (byte) 0xa0, 0x02 + }; + protected static final int FONT_TYPE_OFFSET = 0x9; protected static final int COMPRESSED_RES_HEADER_OFFSET = 0x9; protected static final int COMPRESSED_RES_HEADER_OFFSET_NEW = 0xd; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipFirmwareInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipFirmwareInfo.java index f9ac2c786..4828ffa07 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipFirmwareInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/AmazfitBipFirmwareInfo.java @@ -59,14 +59,6 @@ public class AmazfitBipFirmwareInfo extends HuamiFirmwareInfo { 0x00, (byte) 0x98, 0x00, 0x20, (byte) 0xA5, 0x04, 0x00, 0x20, (byte) 0xAD, 0x04, 0x00, 0x20, (byte) 0xC5, 0x04, 0x00, 0x20 }; - 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 - 0x2a, 0x12, (byte) 0xa0, 0x02 - }; - private static Map crcToVersion = new HashMap<>(); static { // firmware diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbips/AmazfitBipSFirmwareInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbips/AmazfitBipSFirmwareInfo.java index 71d39e0e3..e04800881 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbips/AmazfitBipSFirmwareInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbips/AmazfitBipSFirmwareInfo.java @@ -38,6 +38,9 @@ public class AmazfitBipSFirmwareInfo extends HuamiFirmwareInfo { if (ArrayUtils.startsWith(bytes, WATCHFACE_HEADER)) { return HuamiFirmwareType.WATCHFACE; } + if (ArrayUtils.startsWith(bytes, GPS_CEP_HEADER)) { + return HuamiFirmwareType.GPS_CEP; + } return HuamiFirmwareType.INVALID; }