Rename brightness_timer into display_timenr

This commit is contained in:
Alessio Caiazza 2021-12-21 09:15:50 +01:00 committed by Silvano Seva
parent 351cab1f44
commit d04180c0df
2 changed files with 8 additions and 8 deletions

View File

@ -647,13 +647,13 @@ void _ui_changeContrast(int variation)
void _ui_changeTimer(int variation) void _ui_changeTimer(int variation)
{ {
if ((state.settings.brightness_timer == TIMER_OFF && variation < 0) || if ((state.settings.display_timer == TIMER_OFF && variation < 0) ||
(state.settings.brightness_timer == TIMER_1H && variation > 0)) (state.settings.display_timer == TIMER_1H && variation > 0))
{ {
return; return;
} }
state.settings.brightness_timer += variation; state.settings.display_timer += variation;
} }
bool _ui_checkStandby(long long time_since_last_event) bool _ui_checkStandby(long long time_since_last_event)
@ -663,7 +663,7 @@ bool _ui_checkStandby(long long time_since_last_event)
return false; return false;
} }
switch (state.settings.brightness_timer) switch (state.settings.display_timer)
{ {
case TIMER_OFF: case TIMER_OFF:
return false; return false;
@ -674,19 +674,19 @@ bool _ui_checkStandby(long long time_since_last_event)
case TIMER_25S: case TIMER_25S:
case TIMER_30S: case TIMER_30S:
return time_since_last_event >= return time_since_last_event >=
(5000 * state.settings.brightness_timer); (5000 * state.settings.display_timer);
case TIMER_1M: case TIMER_1M:
case TIMER_2M: case TIMER_2M:
case TIMER_3M: case TIMER_3M:
case TIMER_4M: case TIMER_4M:
case TIMER_5M: case TIMER_5M:
return time_since_last_event >= return time_since_last_event >=
(60000 * (state.settings.brightness_timer - (TIMER_1M - 1))); (60000 * (state.settings.display_timer - (TIMER_1M - 1)));
case TIMER_15M: case TIMER_15M:
case TIMER_30M: case TIMER_30M:
case TIMER_45M: case TIMER_45M:
return time_since_last_event >= return time_since_last_event >=
(60000 * 15 * (state.settings.brightness_timer - (TIMER_15M - 1))); (60000 * 15 * (state.settings.display_timer - (TIMER_15M - 1)));
case TIMER_1H: case TIMER_1H:
return time_since_last_event >= 60 * 60 * 1000; return time_since_last_event >= 60 * 60 * 1000;
} }

View File

@ -160,7 +160,7 @@ int _ui_getDisplayValueName(char *buf, uint8_t max_len, uint8_t index)
#endif #endif
case D_TIMER: case D_TIMER:
snprintf(buf, max_len, "%s", snprintf(buf, max_len, "%s",
display_timer_values[last_state.settings.brightness_timer]); display_timer_values[last_state.settings.display_timer]);
return 0; return 0;
} }
snprintf(buf, max_len, "%d", value); snprintf(buf, max_len, "%d", value);