mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-15 21:27:51 +01:00
Mi Band 6: Fix night mode on latest firmware
This commit is contained in:
parent
c188eccff7
commit
5e33e8e58f
@ -93,10 +93,10 @@ public class MiBand3Support extends AmazfitBipSupport {
|
||||
|
||||
switch (nightMode) {
|
||||
case MiBandConst.PREF_NIGHT_MODE_SUNSET:
|
||||
builder.write(getCharacteristic(HuamiService.UUID_CHARACTERISTIC_3_CONFIGURATION), MiBand3Service.COMMAND_NIGHT_MODE_SUNSET);
|
||||
writeToConfiguration(builder, MiBand3Service.COMMAND_NIGHT_MODE_SUNSET);
|
||||
break;
|
||||
case MiBandConst.PREF_NIGHT_MODE_OFF:
|
||||
builder.write(getCharacteristic(HuamiService.UUID_CHARACTERISTIC_3_CONFIGURATION), MiBand3Service.COMMAND_NIGHT_MODE_OFF);
|
||||
writeToConfiguration(builder, MiBand3Service.COMMAND_NIGHT_MODE_OFF);
|
||||
break;
|
||||
case MiBandConst.PREF_NIGHT_MODE_SCHEDULED:
|
||||
byte[] cmd = MiBand3Service.COMMAND_NIGHT_MODE_SCHEDULED.clone();
|
||||
@ -113,7 +113,7 @@ public class MiBand3Support extends AmazfitBipSupport {
|
||||
cmd[4] = (byte) calendar.get(Calendar.HOUR_OF_DAY);
|
||||
cmd[5] = (byte) calendar.get(Calendar.MINUTE);
|
||||
|
||||
builder.write(getCharacteristic(HuamiService.UUID_CHARACTERISTIC_3_CONFIGURATION), cmd);
|
||||
writeToConfiguration(builder, cmd);
|
||||
break;
|
||||
default:
|
||||
LOG.error("Invalid night mode: " + nightMode);
|
||||
|
Loading…
Reference in New Issue
Block a user