mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-04 09:17:29 +01:00
Make it really clear, that only the first alarm works #323
This commit is contained in:
parent
15954d4561
commit
ee24443b6a
@ -1056,6 +1056,11 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
|||||||
Calendar calendar = alarm.getAlarmCal();
|
Calendar calendar = alarm.getAlarmCal();
|
||||||
int daysMask = 0;
|
int daysMask = 0;
|
||||||
|
|
||||||
|
if (alarm.getIndex() != 0 && alarm.isEnabled()) {
|
||||||
|
GB.toast(getContext(), "Only the first alarm is currently supported.", Toast.LENGTH_LONG, GB.WARN);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (alarm.isEnabled()) {
|
if (alarm.isEnabled()) {
|
||||||
if (alarm.getRepetition(Alarm.ALARM_MON)) {
|
if (alarm.getRepetition(Alarm.ALARM_MON)) {
|
||||||
daysMask |= 1;
|
daysMask |= 1;
|
||||||
@ -1087,9 +1092,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
|||||||
(byte) calendar.get(Calendar.MINUTE),
|
(byte) calendar.get(Calendar.MINUTE),
|
||||||
(byte) daysMask,
|
(byte) daysMask,
|
||||||
};
|
};
|
||||||
if (alarm.isEnabled()) {
|
builder.write(characteristic, alarmMessage);
|
||||||
builder.write(characteristic, alarmMessage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleControlPointResult(byte[] value, int status) {
|
private void handleControlPointResult(byte[] value, int status) {
|
||||||
|
Loading…
Reference in New Issue
Block a user