mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 12:26:48 +01:00
Support flashing newer GPS ALM and support flashing GPS CEP on Bip S
This commit is contained in:
parent
5ac48b0e71
commit
8e08a9d660
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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<Integer, String> crcToVersion = new HashMap<>();
|
||||
static {
|
||||
// firmware
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user