mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 02:25:50 +01:00
Mi Band 3: Fix setting menu items with 2.4 firmware and add support for the new timer menu
This commit is contained in:
parent
fb04e0b48f
commit
78dd7ef153
@ -22,7 +22,7 @@ import static nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiService.EN
|
||||
import static nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiService.ENDPOINT_DISPLAY_ITEMS;
|
||||
|
||||
public class MiBand3Service {
|
||||
public static final byte[] COMMAND_CHANGE_SCREENS = new byte[]{ENDPOINT_DISPLAY_ITEMS, DISPLAY_ITEM_BIT_CLOCK, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00};
|
||||
public static final byte[] COMMAND_CHANGE_SCREENS = new byte[]{ENDPOINT_DISPLAY_ITEMS, DISPLAY_ITEM_BIT_CLOCK, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00};
|
||||
public static final byte[] COMMAND_ENABLE_BAND_SCREEN_UNLOCK = new byte[]{ENDPOINT_DISPLAY, 0x16, 0x00, 0x01};
|
||||
public static final byte[] COMMAND_DISABLE_BAND_SCREEN_UNLOCK = new byte[]{ENDPOINT_DISPLAY, 0x16, 0x00, 0x00};
|
||||
public static final byte[] COMMAND_NIGHT_MODE_OFF = new byte[]{0x1a, 0x00};
|
||||
|
@ -86,9 +86,13 @@ public class MiBand3Support extends AmazfitBipSupport {
|
||||
command[1] |= 0x40;
|
||||
command[9] = pos++;
|
||||
}
|
||||
if (pages.contains("timer")) {
|
||||
command[1] |= 0x80;
|
||||
command[10] = pos++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 4; i <= 9; i++) {
|
||||
for (int i = 4; i <= 10; i++) {
|
||||
if (command[i] == 0) {
|
||||
command[i] = pos++;
|
||||
}
|
||||
|
@ -223,6 +223,7 @@
|
||||
<item>@string/menuitem_more</item>
|
||||
<item>@string/menuitem_status</item>
|
||||
<item>@string/heart_rate</item>
|
||||
<item>@string/menuitem_timer</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_miband3_display_items_values">
|
||||
@ -232,6 +233,7 @@
|
||||
<item>@string/p_menuitem_more</item>
|
||||
<item>@string/p_menuitem_status</item>
|
||||
<item>@string/p_heart_rate</item>
|
||||
<item>@string/p_menuitem_timer</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_miband3_display_items_default">
|
||||
|
Loading…
Reference in New Issue
Block a user