From ba59c62fa46d22c0db0d09571d4fca97fcfdbe06 Mon Sep 17 00:00:00 2001 From: foxstidious Date: Sun, 14 Jan 2024 14:41:29 -0500 Subject: [PATCH] Add support for snooze alarm on CasioGBX100 devices --- .../devices/casio/gbx100/CasioGBX100DeviceCoordinator.java | 5 +++++ .../devices/casio/gbx100/CasioGBX100DeviceSupport.java | 3 +++ 2 files changed, 8 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/casio/gbx100/CasioGBX100DeviceCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/casio/gbx100/CasioGBX100DeviceCoordinator.java index c8da6c419..e96e2f05f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/casio/gbx100/CasioGBX100DeviceCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/casio/gbx100/CasioGBX100DeviceCoordinator.java @@ -97,6 +97,11 @@ public class CasioGBX100DeviceCoordinator extends CasioDeviceCoordinator { return false; } + @Override + public boolean supportsAlarmSnoozing() { + return true; + } + @Override public boolean supportsFindDevice() { return false; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/casio/gbx100/CasioGBX100DeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/casio/gbx100/CasioGBX100DeviceSupport.java index 7c70d3a87..6e8263426 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/casio/gbx100/CasioGBX100DeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/casio/gbx100/CasioGBX100DeviceSupport.java @@ -538,6 +538,9 @@ public class CasioGBX100DeviceSupport extends Casio2C2DSupport implements Shared Alarm alm = alarms.get(i); if(alm.getEnabled()) { settings[0] = 0x40; + if (alm.getSnooze()) { + settings[0] = 0x50; + } } else { settings[0] = 0; }