mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 19:27:33 +01:00
Mi Band 8: Display items (wip)
This commit is contained in:
parent
e8695a5792
commit
eb2a2ca742
@ -49,6 +49,7 @@ public class XiaomiSystemService extends AbstractXiaomiService {
|
||||
public static final int CMD_PASSWORD_GET = 9;
|
||||
public static final int CMD_FIND_PHONE = 17;
|
||||
public static final int CMD_PASSWORD_SET = 21;
|
||||
public static final int CMD_DISPLAY_ITEMS_GET = 29;
|
||||
public static final int CMD_CHARGER = 79;
|
||||
|
||||
public XiaomiSystemService(final XiaomiSupport support) {
|
||||
@ -61,6 +62,7 @@ public class XiaomiSystemService extends AbstractXiaomiService {
|
||||
getSupport().sendCommand(builder, COMMAND_TYPE, CMD_DEVICE_INFO);
|
||||
getSupport().sendCommand(builder, COMMAND_TYPE, CMD_BATTERY);
|
||||
getSupport().sendCommand(builder, COMMAND_TYPE, CMD_PASSWORD_GET);
|
||||
getSupport().sendCommand(builder, COMMAND_TYPE, CMD_DISPLAY_ITEMS_GET);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -86,6 +88,9 @@ public class XiaomiSystemService extends AbstractXiaomiService {
|
||||
}
|
||||
getSupport().evaluateGBDeviceEvent(findPhoneEvent);
|
||||
return;
|
||||
case CMD_DISPLAY_ITEMS_GET:
|
||||
handleDisplayItems(cmd.getSystem().getDisplayItems());
|
||||
return;
|
||||
case CMD_CHARGER:
|
||||
// charger event, request battery state
|
||||
getSupport().sendCommand("request battery state", COMMAND_TYPE, CMD_BATTERY);
|
||||
@ -228,6 +233,10 @@ public class XiaomiSystemService extends AbstractXiaomiService {
|
||||
getSupport().evaluateGBDeviceEvent(eventUpdatePreferences);
|
||||
}
|
||||
|
||||
private void handleDisplayItems(final XiaomiProto.DisplayItems displayItems) {
|
||||
LOG.debug("Got {} display items", displayItems.getDisplayItemCount());
|
||||
}
|
||||
|
||||
public void onFindPhone(final boolean start) {
|
||||
LOG.debug("Find phone: {}", start);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user