🎨 Misc. adjustments, spacing
This commit is contained in:
committed by
Scott Lahteine
parent
70ea0e7c34
commit
2dc4c642e7
@ -184,12 +184,14 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
#endif
|
||||
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
|
||||
uint16_t MarlinUI::lcd_backlight_timeout; // Initialized by settings.load()
|
||||
millis_t MarlinUI::backlight_off_ms = 0;
|
||||
void MarlinUI::refresh_backlight_timeout() {
|
||||
backlight_off_ms = lcd_backlight_timeout ? millis() + lcd_backlight_timeout * 1000UL : 0;
|
||||
WRITE(LCD_BACKLIGHT_PIN, HIGH);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void MarlinUI::init() {
|
||||
|
@ -541,6 +541,10 @@ void menu_configuration() {
|
||||
#if HAS_LCD_CONTRAST && LCD_CONTRAST_MIN < LCD_CONTRAST_MAX
|
||||
EDIT_ITEM_FAST(uint8, MSG_CONTRAST, &ui.contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, ui.refresh_contrast, true);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set display backlight / sleep timeout
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT && LCD_BKL_TIMEOUT_MIN < LCD_BKL_TIMEOUT_MAX
|
||||
EDIT_ITEM(uint16_4, MSG_LCD_TIMEOUT_SEC, &ui.lcd_backlight_timeout, LCD_BKL_TIMEOUT_MIN, LCD_BKL_TIMEOUT_MAX, ui.refresh_backlight_timeout);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user