1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 05:16:51 +01:00

Bangle.js: Allow enable/disable alarms

This commit is contained in:
José Rebelo 2023-08-06 00:23:05 +01:00
parent 28783ce146
commit 2bda160fb5

View File

@ -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) {