🎨 Misc. adjustments, spacing
This commit is contained in:
committed by
Scott Lahteine
parent
70ea0e7c34
commit
2dc4c642e7
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER)
|
||||
#if HAS_GCODE_M876
|
||||
|
||||
#include "../../feature/host_actions.h"
|
||||
#include "../gcode.h"
|
||||
@ -37,4 +37,4 @@ void GcodeSuite::M876() {
|
||||
|
||||
}
|
||||
|
||||
#endif // HOST_PROMPT_SUPPORT && !EMERGENCY_PARSER
|
||||
#endif // HAS_GCODE_M876
|
||||
|
@ -701,6 +701,10 @@
|
||||
#undef SERIAL_XON_XOFF
|
||||
#endif
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER)
|
||||
#define HAS_GCODE_M876 1
|
||||
#endif
|
||||
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
#ifndef ACTION_ON_PAUSE
|
||||
#define ACTION_ON_PAUSE "pause"
|
||||
|
@ -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
|
||||
|
@ -398,7 +398,7 @@ typedef struct SettingsDataStruct {
|
||||
uint8_t lcd_brightness; // M256 B
|
||||
|
||||
//
|
||||
// LCD_BACKLIGHT_TIMEOUT
|
||||
// Display Sleep
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
uint16_t lcd_backlight_timeout; // (G-code needed)
|
||||
@ -1130,7 +1130,7 @@ void MarlinSettings::postprocess() {
|
||||
}
|
||||
|
||||
//
|
||||
// LCD Backlight Timeout
|
||||
// LCD Backlight / Sleep Timeout
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
EEPROM_WRITE(ui.lcd_backlight_timeout);
|
||||
@ -1144,7 +1144,7 @@ void MarlinSettings::postprocess() {
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
const controllerFan_settings_t &cfs = controllerFan.settings;
|
||||
#else
|
||||
controllerFan_settings_t cfs = controllerFan_defaults;
|
||||
constexpr controllerFan_settings_t cfs = controllerFan_defaults;
|
||||
#endif
|
||||
EEPROM_WRITE(cfs);
|
||||
}
|
||||
@ -2054,7 +2054,7 @@ void MarlinSettings::postprocess() {
|
||||
}
|
||||
|
||||
//
|
||||
// LCD Backlight Timeout
|
||||
// LCD Backlight / Sleep Timeout
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
EEPROM_READ(ui.lcd_backlight_timeout);
|
||||
@ -3094,7 +3094,7 @@ void MarlinSettings::reset() {
|
||||
TERN_(HAS_LCD_BRIGHTNESS, ui.brightness = LCD_BRIGHTNESS_DEFAULT);
|
||||
|
||||
//
|
||||
// LCD Backlight Timeout
|
||||
// LCD Backlight / Sleep Timeout
|
||||
//
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
ui.lcd_backlight_timeout = LCD_BACKLIGHT_TIMEOUT;
|
||||
|
Reference in New Issue
Block a user