mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 03:16:51 +01:00
Mi2: Attempt to support non-repetitive alarms #323
This commit is contained in:
parent
e5ade5c0ef
commit
3db9748136
@ -1070,9 +1070,14 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
|
||||
return;
|
||||
}
|
||||
|
||||
int base = 0;
|
||||
if (alarm.isEnabled()) {
|
||||
base = 128;
|
||||
}
|
||||
int daysMask = alarm.getRepetitionMask();
|
||||
int base = alarm.isEnabled() ? 128 : 0;
|
||||
|
||||
if (!alarm.isRepetitive()) {
|
||||
daysMask = 128;
|
||||
}
|
||||
byte[] alarmMessage = new byte[] {
|
||||
(byte) 0x2, // TODO what is this?
|
||||
(byte) (base + alarm.getIndex()), // 128 is the base, alarm slot is added
|
||||
|
Loading…
Reference in New Issue
Block a user