mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-26 17:21:31 +02:00
Mi Band 3/4: Allow enabling the "NFC" menu where supported
Pretty useless, because we do not support NFC - but nice for testing
This commit is contained in:
parent
bb03ccccb4
commit
97540d734f
@ -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, 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, 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] |= 0x80;
|
||||
command[10] = pos++;
|
||||
}
|
||||
if (pages.contains("nfc")) {
|
||||
command[2] |= 0x01;
|
||||
command[11] = pos++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 4; i <= 10; i++) {
|
||||
for (int i = 4; i <= 11; i++) {
|
||||
if (command[i] == 0) {
|
||||
command[i] = pos++;
|
||||
}
|
||||
|
@ -238,6 +238,7 @@
|
||||
<item>@string/menuitem_status</item>
|
||||
<item>@string/heart_rate</item>
|
||||
<item>@string/menuitem_timer</item>
|
||||
<item>@string/menuitem_nfc</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_miband3_display_items_values">
|
||||
@ -248,6 +249,7 @@
|
||||
<item>@string/p_menuitem_status</item>
|
||||
<item>@string/p_heart_rate</item>
|
||||
<item>@string/p_menuitem_timer</item>
|
||||
<item>@string/p_menuitem_nfc</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_miband3_display_items_default">
|
||||
|
@ -662,6 +662,7 @@
|
||||
<string name="menuitem_alipay">Alipay</string>
|
||||
<string name="menuitem_music">Music</string>
|
||||
<string name="menuitem_more">More</string>
|
||||
<string name="menuitem_nfc">NFC</string>
|
||||
<string name="watch9_time_minutes">Minutes:</string>
|
||||
<string name="watch9_time_hours">Hours:</string>
|
||||
<string name="watch9_time_seconds">Seconds:</string>
|
||||
|
@ -32,6 +32,7 @@
|
||||
<item name="p_menuitem_notifications" type="string">notifications</item>
|
||||
<item name="p_menuitem_music" type="string">music</item>
|
||||
<item name="p_menuitem_more" type="string">more</item>
|
||||
<item name="p_menuitem_nfc" type="string">nfc</item>
|
||||
|
||||
<item name="p_off" type="string">off</item>
|
||||
<item name="p_on" type="string">on</item>
|
||||
|
Loading…
Reference in New Issue
Block a user