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:
parent
28783ce146
commit
2bda160fb5
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user