mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-07-25 16:13:35 +02: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) {
|
switch (nightMode) {
|
||||||
case MiBandConst.PREF_NIGHT_MODE_SUNSET:
|
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;
|
break;
|
||||||
case MiBandConst.PREF_NIGHT_MODE_OFF:
|
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;
|
break;
|
||||||
case MiBandConst.PREF_NIGHT_MODE_SCHEDULED:
|
case MiBandConst.PREF_NIGHT_MODE_SCHEDULED:
|
||||||
byte[] cmd = MiBand3Service.COMMAND_NIGHT_MODE_SCHEDULED.clone();
|
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[4] = (byte) calendar.get(Calendar.HOUR_OF_DAY);
|
||||||
cmd[5] = (byte) calendar.get(Calendar.MINUTE);
|
cmd[5] = (byte) calendar.get(Calendar.MINUTE);
|
||||||
|
|
||||||
builder.write(getCharacteristic(HuamiService.UUID_CHARACTERISTIC_3_CONFIGURATION), cmd);
|
writeToConfiguration(builder, cmd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG.error("Invalid night mode: " + nightMode);
|
LOG.error("Invalid night mode: " + nightMode);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user