Amazfit Cor: Allow watchfaces to be flashed

Untested as Cor has no maintainer
This commit is contained in:
Andreas Shimokawa 2018-02-01 14:22:18 +01:00
parent 5973f189eb
commit 3871b6f0be

View File

@ -68,6 +68,8 @@ public class AmazfitCorFirmwareInfo extends HuamiFirmwareInfo {
} else if (ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET) || ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET_2) || ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET_3)) {
// TODO: this is certainly not a correct validation, but it works for now
return HuamiFirmwareType.FIRMWARE;
} else if (ArrayUtils.startsWith(bytes, WATCHFACE_HEADER)) {
return HuamiFirmwareType.WATCHFACE;
}
return HuamiFirmwareType.INVALID;
}