From 7c3dc741d2e59c7e5a120cbd314ce95963f5460a Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Tue, 11 Oct 2016 21:38:17 +0200 Subject: [PATCH] Send vibration off-commands to Mi2 (#323) Far from perfect, but a little better. --- .../service/devices/miband2/Mi2NotificationStrategy.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/Mi2NotificationStrategy.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/Mi2NotificationStrategy.java index 42fdad15..7d00d02e 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/Mi2NotificationStrategy.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/miband2/Mi2NotificationStrategy.java @@ -26,8 +26,8 @@ public class Mi2NotificationStrategy extends V2NotificationStrategy { int on = onOffSequence[j]; on = Math.min(500, on); // longer than 500ms is not possible builder.write(alert, new byte[]{(byte) vibrationProfile.getAlertLevel()}); -// builder.wait(on); -// builder.write(alert, new byte[]{GattCharacteristic.NO_ALERT}); + builder.wait(on); + builder.write(alert, new byte[]{GattCharacteristic.NO_ALERT}); if (++j < onOffSequence.length) { int off = Math.max(onOffSequence[j], 25); // wait at least 25ms