Fix compile error

This commit is contained in:
Theo Arends 2020-10-29 14:41:12 +01:00
parent e59bfc1d69
commit 4c6fa325ac
2 changed files with 5 additions and 5 deletions

View File

@ -180,8 +180,8 @@ void RotaryHandler(void) {
Encoder[index].position = rotary_offset; Encoder[index].position = rotary_offset;
interrupts(); interrupts();
if (Settings.save_data && (save_data_counter < 2)) { if (Settings.save_data && (TasmotaGlobal.save_data_counter < 2)) {
save_data_counter = 3; // Postpone flash writes while rotary is turned TasmotaGlobal.save_data_counter = 3; // Postpone flash writes while rotary is turned
} }
bool button_pressed = (Button.hold_timer[index]); // Button is pressed: set color temperature bool button_pressed = (Button.hold_timer[index]); // Button is pressed: set color temperature

View File

@ -2134,9 +2134,9 @@ bool LightApplyFade(void) { // did the value chanegd and needs to be applied
if (Settings.save_data) { if (Settings.save_data) {
// Also postpone the save_data for the duration of the Fade (in seconds) // Also postpone the save_data for the duration of the Fade (in seconds)
uint32_t delay_seconds = 1 + (Light.fade_duration + 999) / 1000; // add one more second uint32_t delay_seconds = 1 + (Light.fade_duration + 999) / 1000; // add one more second
// AddLog_P2(LOG_LEVEL_INFO, PSTR("delay_seconds %d, save_data_counter %d"), delay_seconds, save_data_counter); // AddLog_P2(LOG_LEVEL_INFO, PSTR("delay_seconds %d, save_data_counter %d"), delay_seconds, TasmotaGlobal.save_data_counter);
if (save_data_counter < delay_seconds) { if (TasmotaGlobal.save_data_counter < delay_seconds) {
save_data_counter = delay_seconds; // pospone TasmotaGlobal.save_data_counter = delay_seconds; // pospone
} }
} }
} else { } else {