1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 18:15:49 +01:00

Amazfit Neo: fix alarms setting to "unused" on connect.

This commit is contained in:
NekoBox 2022-08-12 16:57:24 +03:00
parent 9764ce03b2
commit eceb612c9e
2 changed files with 6 additions and 1 deletions

View File

@ -3895,7 +3895,7 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport {
return this;
}
private HuamiSupport requestAlarms(TransactionBuilder builder) {
protected HuamiSupport requestAlarms(TransactionBuilder builder) {
LOG.info("Requesting alarms");
//FIXME: on older devices only the first one works, and on newer only the last is sufficient
writeToConfiguration(builder, HuamiService.COMMAND_REQUEST_ALARMS);

View File

@ -80,6 +80,11 @@ public class AmazfitNeoSupport extends MiBand5Support {
writeToChunked(builder, 2, bytes);
}
@Override
protected AmazfitNeoSupport requestAlarms(TransactionBuilder builder) {
return this; //Neo always returns response array with '03' in it which marks alarms unused on connect
}
@Override
public boolean supportsHourlyChime() { return true; }