mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-09 03:37:03 +01:00
Zepp OS 4: Fix shortcut cards
This commit is contained in:
parent
10e27c88c6
commit
8577c5d546
@ -90,6 +90,8 @@ public class ZeppOsShortcutCardsService extends AbstractZeppOsService {
|
|||||||
READINESS("34", "1"),
|
READINESS("34", "1"),
|
||||||
ALEXA("35", "1"),
|
ALEXA("35", "1"),
|
||||||
ZEPP_PAY("37", "1"),
|
ZEPP_PAY("37", "1"),
|
||||||
|
CALORIES("38", "1"),
|
||||||
|
HRV("1047865", "1"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String appNum;
|
private final String appNum;
|
||||||
@ -194,11 +196,7 @@ public class ZeppOsShortcutCardsService extends AbstractZeppOsService {
|
|||||||
final String appNum = StringUtils.untilNullTerminator(buf);
|
final String appNum = StringUtils.untilNullTerminator(buf);
|
||||||
final String cardNum = StringUtils.untilNullTerminator(buf);
|
final String cardNum = StringUtils.untilNullTerminator(buf);
|
||||||
final boolean enabled = buf.get() == 0x01;
|
final boolean enabled = buf.get() == 0x01;
|
||||||
final byte b = buf.get();
|
final String version = StringUtils.untilNullTerminator(buf);
|
||||||
if (b != 0) {
|
|
||||||
LOG.warn("Unexpected byte {} at pos {}", b, buf.position() - 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final ShortcutCard card = ShortcutCard.fromCodes(appNum, cardNum);
|
final ShortcutCard card = ShortcutCard.fromCodes(appNum, cardNum);
|
||||||
final String cardPrefValue;
|
final String cardPrefValue;
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
@ -954,6 +954,7 @@
|
|||||||
<item>@string/menuitem_sleep</item>
|
<item>@string/menuitem_sleep</item>
|
||||||
<item>@string/menuitem_hr</item>
|
<item>@string/menuitem_hr</item>
|
||||||
<item>@string/menuitem_activity</item>
|
<item>@string/menuitem_activity</item>
|
||||||
|
<item>@string/calories</item>
|
||||||
<item>@string/menuitem_spo2</item>
|
<item>@string/menuitem_spo2</item>
|
||||||
<item>@string/menuitem_phone</item>
|
<item>@string/menuitem_phone</item>
|
||||||
<item>@string/menuitem_events</item>
|
<item>@string/menuitem_events</item>
|
||||||
@ -973,6 +974,7 @@
|
|||||||
<item>@string/menuitem_recommendation</item>
|
<item>@string/menuitem_recommendation</item>
|
||||||
<item>@string/menuitem_zepp_coach</item>
|
<item>@string/menuitem_zepp_coach</item>
|
||||||
<item>@string/menuitem_zepp_pay</item>
|
<item>@string/menuitem_zepp_pay</item>
|
||||||
|
<item>@string/hrv</item>
|
||||||
<item>@string/menuitem_readiness</item>
|
<item>@string/menuitem_readiness</item>
|
||||||
<item>@string/menuitem_body_composition</item>
|
<item>@string/menuitem_body_composition</item>
|
||||||
<item>@string/menuitem_thermometer</item>
|
<item>@string/menuitem_thermometer</item>
|
||||||
@ -990,6 +992,7 @@
|
|||||||
<item>sleep</item>
|
<item>sleep</item>
|
||||||
<item>heartrate</item>
|
<item>heartrate</item>
|
||||||
<item>activity</item>
|
<item>activity</item>
|
||||||
|
<item>calories</item>
|
||||||
<item>spo2</item>
|
<item>spo2</item>
|
||||||
<item>phone</item>
|
<item>phone</item>
|
||||||
<item>events</item>
|
<item>events</item>
|
||||||
@ -1009,6 +1012,7 @@
|
|||||||
<item>recommendation</item>
|
<item>recommendation</item>
|
||||||
<item>zepp_coach</item>
|
<item>zepp_coach</item>
|
||||||
<item>zepp_pay</item>
|
<item>zepp_pay</item>
|
||||||
|
<item>hrv</item>
|
||||||
<item>readiness</item>
|
<item>readiness</item>
|
||||||
<item>body_composition</item>
|
<item>body_composition</item>
|
||||||
<item>thermometer</item>
|
<item>thermometer</item>
|
||||||
|
@ -843,6 +843,7 @@
|
|||||||
<string name="prefs_charts_tabs_summary">Visible chart tabs</string>
|
<string name="prefs_charts_tabs_summary">Visible chart tabs</string>
|
||||||
<string name="sleepchart_your_sleep">Sleep</string>
|
<string name="sleepchart_your_sleep">Sleep</string>
|
||||||
<string name="hrv_status">HRV Status</string>
|
<string name="hrv_status">HRV Status</string>
|
||||||
|
<string name="hrv">HRV</string>
|
||||||
<string name="weeksleepchart_sleep_a_week">Sleep per week</string>
|
<string name="weeksleepchart_sleep_a_week">Sleep per week</string>
|
||||||
<string name="weeksleepchart_today_sleep_description">Sleep today, target: %1$s</string>
|
<string name="weeksleepchart_today_sleep_description">Sleep today, target: %1$s</string>
|
||||||
<string name="weekstepschart_steps_a_week">Steps per week</string>
|
<string name="weekstepschart_steps_a_week">Steps per week</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user