mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Mi Band 8: Add find watch
This commit is contained in:
parent
18fc29fae7
commit
fcf680f799
@ -303,8 +303,7 @@ public class XiaomiSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
@Override
|
||||
public void onFindDevice(final boolean start) {
|
||||
// TODO onFindDevice
|
||||
super.onFindDevice(start);
|
||||
systemService.onFindWatch(start);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,6 +55,7 @@ public class XiaomiSystemService extends AbstractXiaomiService {
|
||||
public static final int CMD_CLOCK = 3;
|
||||
public static final int CMD_PASSWORD_GET = 9;
|
||||
public static final int CMD_FIND_PHONE = 17;
|
||||
public static final int CMD_FIND_WATCH = 18;
|
||||
public static final int CMD_PASSWORD_SET = 21;
|
||||
public static final int CMD_DISPLAY_ITEMS_GET = 29;
|
||||
public static final int CMD_CHARGER = 79;
|
||||
@ -301,4 +302,17 @@ public class XiaomiSystemService extends AbstractXiaomiService {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public void onFindWatch(final boolean start) {
|
||||
LOG.debug("Find watch: {}", start);
|
||||
|
||||
getSupport().sendCommand(
|
||||
"find watch " + start,
|
||||
XiaomiProto.Command.newBuilder()
|
||||
.setType(COMMAND_TYPE)
|
||||
.setSubtype(CMD_FIND_WATCH)
|
||||
.setSystem(XiaomiProto.System.newBuilder().setFindDevice(start ? 0 : 1).build())
|
||||
.build()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user