mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-28 19:45:50 +01:00
Basic support for Mi Band 2 #323, untested
This commit is contained in:
parent
1ed0dc59b2
commit
ca26e27c60
@ -28,6 +28,7 @@ public final class MiBandConst {
|
||||
public static final String MI_1A = "1A";
|
||||
public static final String MI_1S = "1S";
|
||||
public static final String MI_AMAZFIT = "Amazfit";
|
||||
public static final String MI_PRO = "2";
|
||||
|
||||
public static int getNotificationPrefIntValue(String pref, String origin, Prefs prefs, int defaultValue) {
|
||||
String key = getNotificationPrefKey(pref, origin);
|
||||
|
@ -83,7 +83,7 @@ public class DeviceInfo extends AbstractInfo {
|
||||
}
|
||||
|
||||
public boolean supportsHeartrate() {
|
||||
return isMili1S() || (test1AHRMode && isMili1A());
|
||||
return isMiliPro() || isMili1S() || (test1AHRMode && isMili1A());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -116,6 +116,10 @@ public class DeviceInfo extends AbstractInfo {
|
||||
return hwVersion == 6;
|
||||
}
|
||||
|
||||
public boolean isMiliPro() {
|
||||
return hwVersion == 8 || (feature == 8 && appearance == 0);
|
||||
}
|
||||
|
||||
public String getHwVersion() {
|
||||
if (isMili1()) {
|
||||
return MiBandConst.MI_1;
|
||||
@ -129,6 +133,9 @@ public class DeviceInfo extends AbstractInfo {
|
||||
if (isAmazFit()) {
|
||||
return MiBandConst.MI_AMAZFIT;
|
||||
}
|
||||
if (isMiliPro()) {
|
||||
return MiBandConst.MI_PRO;
|
||||
}
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user