From 9471131490546fc639c25f8e36d7fa0007e92856 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sat, 16 Sep 2017 12:33:33 +0200 Subject: [PATCH] Amazfit Bip: log more events coming from the watch --- .../service/devices/amazfitbip/AmazfitBipEvent.java | 3 +++ .../service/devices/amazfitbip/AmazfitBipSupport.java | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipEvent.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipEvent.java index 4ab1db74c..ff5f8fc5d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipEvent.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipEvent.java @@ -18,10 +18,13 @@ package nodomain.freeyourgadget.gadgetbridge.service.devices.amazfitbip; public class AmazfitBipEvent { + public static final byte FELL_ASLEEP = 0x01; + public static final byte WOKE_UP = 0x02; public static final byte BUTTON_PRESSED = 0x04; public static final byte START_NONWEAR = 0x06; public static final byte CALL_REJECT = 0x07; public static final byte CALL_ACCEPT = 0x09; public static final byte ALARM_TOGGLED = 0x0a; public static final byte BUTTON_PRESSED_LONG = 0x0b; + public static final byte TICK_30MIN = 0x0e; // unsure } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipSupport.java index f95db3271..bc2232f95 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/amazfitbip/AmazfitBipSupport.java @@ -139,6 +139,15 @@ public class AmazfitBipSupport extends MiBand2Support { case AmazfitBipEvent.ALARM_TOGGLED: LOG.info("An alarm was toggled"); // TODO: sync alarms watch -> GB break; + case AmazfitBipEvent.FELL_ASLEEP: + LOG.info("Fell asleep"); + break; + case AmazfitBipEvent.WOKE_UP: + LOG.info("Woke up"); + break; + case AmazfitBipEvent.TICK_30MIN: + LOG.info("Tick 30 min (?)"); + break; default: LOG.warn("unhandled event " + value[0]); }