mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-24 17:45:50 +01:00
try to fix cor firmware recognition for newer versions
This commit is contained in:
parent
1c84a5b2c7
commit
ad750c0047
@ -33,6 +33,7 @@ public class AmazfitCorFirmwareInfo extends HuamiFirmwareInfo {
|
||||
};
|
||||
|
||||
private static final int FW_HEADER_OFFSET = 0x9330;
|
||||
private static final int FW_HEADER_OFFSET_2 = 0x9340;
|
||||
private static final int NEW_RES_HEADER_OFFSET = 0x9;
|
||||
|
||||
private static Map<Integer, String> crcToVersion = new HashMap<>();
|
||||
@ -61,7 +62,7 @@ public class AmazfitCorFirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.RES;
|
||||
} else if (ArrayUtils.equals(bytes, RES_HEADER, NEW_RES_HEADER_OFFSET)) {
|
||||
return HuamiFirmwareType.RES_NEW;
|
||||
} else if (ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET)) {
|
||||
} else if (ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET) || ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET_2)) {
|
||||
// TODO: this is certainly not a correct validation, but it works for now
|
||||
return HuamiFirmwareType.FIRMWARE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user