Amazfit Bip: enable caller name display upon initialization
This is neccessary for newer firmwares (0.0.8.74 at least) (I assume this command also exists on Mi2, hope it is true :D)
This commit is contained in:
parent
5f1014f553
commit
4bb18b9795
|
@ -170,6 +170,8 @@ public class MiBand2Service {
|
|||
public static final byte[] COMMAND_DISABLE_GOAL_NOTIFICATION = new byte[]{ENDPOINT_DISPLAY, 0x06, 0x00, 0x00};
|
||||
public static final byte[] COMMAND_ENABLE_ROTATE_WRIST_TO_SWITCH_INFO = new byte[]{ENDPOINT_DISPLAY, 0x0d, 0x00, 0x01};
|
||||
public static final byte[] COMMAND_DISABLE_ROTATE_WRIST_TO_SWITCH_INFO = new byte[]{ENDPOINT_DISPLAY, 0x0d, 0x00, 0x00};
|
||||
public static final byte[] COMMAND_ENABLE_DISPLAY_CALLER = new byte[]{ENDPOINT_DISPLAY, 0x10, 0x00, 0x00, 0x01};
|
||||
public static final byte[] COMMAND_DISABLE_DISPLAY_CALLER = new byte[]{ENDPOINT_DISPLAY, 0x10, 0x00, 0x00, 0x00};
|
||||
public static final byte[] DISPLAY_XXX = new byte[] {ENDPOINT_DISPLAY, 0x03, 0x0, 0x0 };
|
||||
public static final byte[] DISPLAY_YYY = new byte[] {ENDPOINT_DISPLAY, 0x10, 0x0, 0x1, 0x1 };
|
||||
|
||||
|
|
|
@ -1215,6 +1215,11 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
|||
return this;
|
||||
}
|
||||
|
||||
private MiBand2Support setDisplayCaller(TransactionBuilder builder) {
|
||||
builder.write(getCharacteristic(MiBand2Service.UUID_CHARACTERISTIC_3_CONFIGURATION), MiBand2Service.COMMAND_ENABLE_DISPLAY_CALLER);
|
||||
return this;
|
||||
}
|
||||
|
||||
private MiBand2Support setDoNotDisturb(TransactionBuilder builder) {
|
||||
DoNotDisturb doNotDisturb = MiBand2Coordinator.getDoNotDisturb(getContext());
|
||||
LOG.info("Setting do not disturb to " + doNotDisturb);
|
||||
|
@ -1314,6 +1319,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
|||
setDoNotDisturb(builder);
|
||||
setRotateWristToSwitchInfo(builder);
|
||||
setActivateDisplayOnLiftWrist(builder);
|
||||
setDisplayCaller(builder);
|
||||
setGoalNotification(builder);
|
||||
setInactivityWarnings(builder);
|
||||
setHeartrateSleepSupport(builder);
|
||||
|
|
Loading…
Reference in New Issue