Various fixes

This commit is contained in:
cschwinne
2020-12-10 16:27:23 +01:00
parent 7684fb83d6
commit 03516e11f7
6 changed files with 34 additions and 5 deletions

View File

@@ -107,7 +107,7 @@ void colorUpdated(int callMode)
notify(callMode);
//set flag to update blynk and mqtt
if (callMode != NOTIFIER_CALL_MODE_PRESET_CYCLE) interfaceUpdateCallMode = callMode;
interfaceUpdateCallMode = callMode;
} else {
if (nightlightActive && !nightlightActiveOld &&
callMode != NOTIFIER_CALL_MODE_NOTIFICATION &&
@@ -303,10 +303,10 @@ void handleNightlight()
if (bri == 0 || nightlightActive) return;
if (presetCycCurr < presetCycleMin || presetCycCurr > presetCycleMax) presetCycCurr = presetCycleMin;
applyPreset(presetCycCurr);
applyPreset(presetCycCurr); //this handles colorUpdated() for us
presetCycCurr++;
if (presetCycCurr > 250) presetCycCurr = 1;
colorUpdated(NOTIFIER_CALL_MODE_PRESET_CYCLE);
interfaceUpdateCallMode = 0; //disable updates to MQTT and Blynk
}
}