🩹 Fix LCD_BACKLIGHT_TIMEOUT compile (#24463)
This commit is contained in:
committed by
Scott Lahteine
parent
d9ecbdcdbb
commit
79a332b57e
@ -886,7 +886,7 @@ private:
|
||||
static void M250_report(const bool forReplay=true);
|
||||
#endif
|
||||
|
||||
#if HAS_DISPLAY_SLEEP
|
||||
#if HAS_GCODE_M255
|
||||
static void M255();
|
||||
static void M255_report(const bool forReplay=true);
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@ void GcodeSuite::M255() {
|
||||
const int m = parser.value_int();
|
||||
ui.sleep_timeout_minutes = constrain(m, SLEEP_TIMEOUT_MIN, SLEEP_TIMEOUT_MAX);
|
||||
#else
|
||||
const int s = parser.value_int() * 60;
|
||||
const unsigned int s = parser.value_ushort() * 60;
|
||||
ui.lcd_backlight_timeout = constrain(s, LCD_BKL_TIMEOUT_MIN, LCD_BKL_TIMEOUT_MAX);
|
||||
#endif
|
||||
}
|
||||
|
@ -591,6 +591,10 @@
|
||||
#define HAS_PRINT_PROGRESS 1
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_MENU, ULTIPANEL_FEEDMULTIPLY, SOFT_RESET_ON_KILL)
|
||||
#define HAS_ENCODER_ACTION 1
|
||||
#endif
|
||||
|
||||
#if STATUS_MESSAGE_TIMEOUT_SEC > 0
|
||||
#define HAS_STATUS_MESSAGE_TIMEOUT 1
|
||||
#endif
|
||||
|
@ -32,10 +32,6 @@
|
||||
#include "tft_io/touch_calibration.h"
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_MENU, ULTIPANEL_FEEDMULTIPLY, SOFT_RESET_ON_KILL)
|
||||
#define HAS_ENCODER_ACTION 1
|
||||
#endif
|
||||
|
||||
#if E_MANUAL > 1
|
||||
#define MULTI_E_MANUAL 1
|
||||
#endif
|
||||
@ -271,8 +267,8 @@ public:
|
||||
#endif
|
||||
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
#define LCD_BKL_TIMEOUT_MIN 1
|
||||
#define LCD_BKL_TIMEOUT_MAX (60*60*18) // 18 hours max within uint16_t
|
||||
#define LCD_BKL_TIMEOUT_MIN 1u
|
||||
#define LCD_BKL_TIMEOUT_MAX UINT16_MAX // Slightly more than 18 hours
|
||||
static uint16_t lcd_backlight_timeout;
|
||||
static millis_t backlight_off_ms;
|
||||
static void refresh_backlight_timeout();
|
||||
|
Reference in New Issue
Block a user