1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-15 21:27:51 +01:00

Mi Band 6: Enable World clock setting

Also take care of new/old firmware
This commit is contained in:
Andreas Shimokawa 2022-05-10 14:16:52 +02:00
parent 5c6edea233
commit 46cd229a14
2 changed files with 12 additions and 1 deletions

View File

@ -70,6 +70,16 @@ public class MiBand6Coordinator extends HuamiCoordinator {
return true;
}
@Override
public int getWorldClocksSlotCount() {
return 20; // as enforced by Mi Fit
}
@Override
public int getWorldClocksLabelLength() {
return 30; // at least
}
@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
return new int[]{
@ -78,6 +88,7 @@ public class MiBand6Coordinator extends HuamiCoordinator {
R.xml.devicesettings_custom_emoji_font,
R.xml.devicesettings_timeformat,
R.xml.devicesettings_dateformat,
R.xml.devicesettings_world_clocks,
R.xml.devicesettings_nightmode,
R.xml.devicesettings_liftwrist_display_sensitivity,
R.xml.devicesettings_swipeunlock,

View File

@ -978,7 +978,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
return;
}
writeToChunked2021(builder, (short) 0x0008, getNextHandle(), baos.toByteArray(), false, false);
writeToChunked2021(builder, (short) 0x0008, getNextHandle(), baos.toByteArray(), force2021Protocol, false);
}
public byte[] encodeWorldClock(final WorldClock clock) {