From 2bda160fb5d11cc98849207ddbc509d722e6183b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Sun, 6 Aug 2023 00:23:05 +0100 Subject: [PATCH] Bangle.js: Allow enable/disable alarms --- .../service/devices/banglejs/BangleJSDeviceSupport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java index 7d4e9194d..e58d8ab8a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java @@ -1212,13 +1212,14 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport { o.put("d", jsonalarms); for (Alarm alarm : alarms) { - if (!alarm.getEnabled()) continue; + if (alarm.getUnused()) continue; JSONObject jsonalarm = new JSONObject(); jsonalarms.put(jsonalarm); //Calendar calendar = AlarmUtils.toCalendar(alarm); jsonalarm.put("h", alarm.getHour()); jsonalarm.put("m", alarm.getMinute()); jsonalarm.put("rep", alarm.getRepetition()); + jsonalarm.put("on", alarm.getEnabled()); } uartTxJSON("onSetAlarms", o); } catch (JSONException e) {