1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 18:15:49 +01:00

Amazfit Cor: Fix flashing of new .res files

This commit is contained in:
Andreas Shimokawa 2017-11-06 07:17:01 +01:00
parent 11d49f223b
commit 6b56e8e568
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ public enum HuamiFirmwareType {
FIRMWARE((byte) 0), FIRMWARE((byte) 0),
FONT((byte) 1), FONT((byte) 1),
RES((byte) 2), RES((byte) 2),
RES_NEW((byte)130),
GPS((byte) 3), GPS((byte) 3),
GPS_CEP((byte) 4), GPS_CEP((byte) 4),
GPS_ALMANAC((byte)5), GPS_ALMANAC((byte)5),

View File

@ -60,7 +60,7 @@ public class AmazfitCorFirmwareInfo extends HuamiFirmwareInfo {
} }
return HuamiFirmwareType.RES; return HuamiFirmwareType.RES;
} else if (ArrayUtils.equals(bytes, RES_HEADER, NEW_RES_HEADER_OFFSET)) { } else if (ArrayUtils.equals(bytes, RES_HEADER, NEW_RES_HEADER_OFFSET)) {
return HuamiFirmwareType.RES; return HuamiFirmwareType.RES_NEW;
} else if (ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET)) { } else if (ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET)) {
// TODO: this is certainly not a correct validation, but it works for now // TODO: this is certainly not a correct validation, but it works for now
return HuamiFirmwareType.FIRMWARE; return HuamiFirmwareType.FIRMWARE;