1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-04 09:17:29 +01:00

Amazfit Cor: Fix problem with firmware 1.0.6.27 where Cor was detected as Mi Band 2

The root cause of this problem is that starting from firmware 1.0.6.27 the
bluetooth name was changed to "Amazfit Cor" from "Amazfit Band"

This resulted in advanced features not working, including firmware flashing.
This commit is contained in:
Andreas Shimokawa 2017-12-30 22:27:00 +01:00
parent 01a5d862a0
commit d4ce333f14

View File

@ -44,7 +44,7 @@ public class AmazfitCorCoordinator extends HuamiCoordinator {
try {
BluetoothDevice device = candidate.getDevice();
String name = device.getName();
if (name != null && name.equalsIgnoreCase("Amazfit Band")) {
if (name != null && (name.equalsIgnoreCase("Amazfit Band") || name.equalsIgnoreCase("Amazfit Cor"))) {
return DeviceType.AMAZFITCOR;
}
} catch (Exception ex) {