diff --git a/CHANGELOG.md b/CHANGELOG.md index 91d70f356..eeaa7b9aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ * Amazfit Band 5: Allow enabling SpO2 menu * Mi/Amazfit Band 5: Support shortcuts (right/left swipe) * Amazfit GTS: Fix firmware flashing on Firmware >=0.1.1.16 -* Amazfit GTR: Fix firmware flashing on Firmware >=1.3.7.16 +* Amazfit GTR: Fix firmware flashing on Firmware >=1.3.7.16 or >=1.7.0.10 * Fossil Hybrid HR: Remove Android notifications when deleting them from the watch * Fossil Hybrid HR: Enable rejecting calls on newer firmwares * Fossil Hybrid HR: Support hands calibration diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitgtr/AmazfitGTRSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitgtr/AmazfitGTRSupport.java index f19456b5b..ebc635025 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitgtr/AmazfitGTRSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitgtr/AmazfitGTRSupport.java @@ -39,7 +39,7 @@ public class AmazfitGTRSupport extends AmazfitGTSSupport { @Override public UpdateFirmwareOperation createUpdateFirmwareOperation(Uri uri) { Version version = new Version(gbDevice.getFirmwareVersion()); - if (version.compareTo(new Version("1.3.7.16")) >= 0) { + if ((!isCH(version) && (version.compareTo(new Version("1.3.7.16")) >= 0)) || (version.compareTo(new Version("1.7.0.10")) >= 0)) { return new UpdateFirmwareOperation2020(uri, this); } @@ -59,6 +59,11 @@ public class AmazfitGTRSupport extends AmazfitGTSSupport { } private boolean is47mm(Version version) { - return version.compareTo(new Version("1.0.0.00")) >= 0; + return (version.compareTo(new Version("1.0.0.00")) >= 0) && (version.compareTo(new Version("1.6.0.00")) < 0); } + + private boolean isCH(Version version) { // chinese variant? + return version.compareTo(new Version("1.6.0.00")) >= 0; + } + }