1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +01:00

Amazfit Cor: Allow to enable music menu on device

This commit is contained in:
Andreas Shimokawa 2018-08-02 22:29:25 +02:00
parent 664ffdd629
commit 66391e10c9
5 changed files with 9 additions and 1 deletions

View File

@ -21,5 +21,5 @@ import static nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiService.DI
import static nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiService.ENDPOINT_DISPLAY_ITEMS;
public class AmazfitCorService {
public static final byte[] COMMAND_CHANGE_SCREENS = new byte[]{ENDPOINT_DISPLAY_ITEMS, DISPLAY_ITEM_BIT_CLOCK, 0x20, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
public static final byte[] COMMAND_CHANGE_SCREENS = new byte[]{ENDPOINT_DISPLAY_ITEMS, DISPLAY_ITEM_BIT_CLOCK, 0x20, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09};
}

View File

@ -71,6 +71,9 @@ public class AmazfitCorSupport extends AmazfitBipSupport {
if (pages.contains("alipay")) {
command[2] |= 0x01;
}
if (pages.contains("music")) {
command[2] |= 0x02;
}
}
builder.write(getCharacteristic(HuamiService.UUID_CHARACTERISTIC_3_CONFIGURATION), command);

View File

@ -261,6 +261,7 @@
<item>@string/menuitem_timer</item>
<item>@string/menuitem_settings</item>
<item>@string/menuitem_alipay</item>
<item>@string/menuitem_music</item>
</string-array>
<string-array name="pref_cor_display_items_values">
@ -272,6 +273,7 @@
<item>@string/p_menuitem_timer</item>
<item>@string/p_menuitem_settings</item>
<item>@string/p_menuitem_alipay</item>
<item>@string/p_menuitem_music</item>
</string-array>
<string-array name="pref_cor_display_items_default">
@ -282,6 +284,7 @@
<item>@string/p_menuitem_alarm</item>
<item>@string/p_menuitem_timer</item>
<item>@string/p_menuitem_settings</item>
<item>@string/p_menuitem_music</item>
</string-array>

View File

@ -593,5 +593,6 @@
<string name="menuitem_compass">Compass</string>
<string name="menuitem_settings">Settings</string>
<string name="menuitem_alipay">Alipay</string>
<string name="menuitem_music">Music</string>
<string name="menuitem_more">More</string>
</resources>

View File

@ -30,6 +30,7 @@
<item name="p_menuitem_settings" type="string">settings</item>
<item name="p_menuitem_alipay" type="string">alipay</item>
<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_off" type="string">off</item>