🩹 Fix LCD_BACKLIGHT_TIMEOUT compile (#24463)

This commit is contained in:
Jason Smith 2022-07-07 21:43:56 -07:00 committed by Scott Lahteine
parent b025c18d5b
commit c96ed8998b
5 changed files with 13 additions and 12 deletions

View file

@ -885,7 +885,7 @@ private:
static void M250_report(const bool forReplay=true); static void M250_report(const bool forReplay=true);
#endif #endif
#if HAS_DISPLAY_SLEEP #if HAS_GCODE_M255
static void M255(); static void M255();
static void M255_report(const bool forReplay=true); static void M255_report(const bool forReplay=true);
#endif #endif

View file

@ -36,7 +36,7 @@ void GcodeSuite::M255() {
const int m = parser.value_int(); const int m = parser.value_int();
ui.sleep_timeout_minutes = constrain(m, SLEEP_TIMEOUT_MIN, SLEEP_TIMEOUT_MAX); ui.sleep_timeout_minutes = constrain(m, SLEEP_TIMEOUT_MIN, SLEEP_TIMEOUT_MAX);
#else #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); ui.lcd_backlight_timeout = constrain(s, LCD_BKL_TIMEOUT_MIN, LCD_BKL_TIMEOUT_MAX);
#endif #endif
} }

View file

@ -587,6 +587,10 @@
#define HAS_PRINT_PROGRESS 1 #define HAS_PRINT_PROGRESS 1
#endif #endif
#if ANY(HAS_MARLINUI_MENU, ULTIPANEL_FEEDMULTIPLY, SOFT_RESET_ON_KILL)
#define HAS_ENCODER_ACTION 1
#endif
#if STATUS_MESSAGE_TIMEOUT_SEC > 0 #if STATUS_MESSAGE_TIMEOUT_SEC > 0
#define HAS_STATUS_MESSAGE_TIMEOUT 1 #define HAS_STATUS_MESSAGE_TIMEOUT 1
#endif #endif

View file

@ -32,10 +32,6 @@
#include "tft_io/touch_calibration.h" #include "tft_io/touch_calibration.h"
#endif #endif
#if ANY(HAS_MARLINUI_MENU, ULTIPANEL_FEEDMULTIPLY, SOFT_RESET_ON_KILL)
#define HAS_ENCODER_ACTION 1
#endif
#if E_MANUAL > 1 #if E_MANUAL > 1
#define MULTI_E_MANUAL 1 #define MULTI_E_MANUAL 1
#endif #endif
@ -273,8 +269,8 @@ public:
#endif #endif
#if LCD_BACKLIGHT_TIMEOUT #if LCD_BACKLIGHT_TIMEOUT
#define LCD_BKL_TIMEOUT_MIN 1 #define LCD_BKL_TIMEOUT_MIN 1u
#define LCD_BKL_TIMEOUT_MAX (60*60*18) // 18 hours max within uint16_t #define LCD_BKL_TIMEOUT_MAX UINT16_MAX // Slightly more than 18 hours
static uint16_t lcd_backlight_timeout; static uint16_t lcd_backlight_timeout;
static millis_t backlight_off_ms; static millis_t backlight_off_ms;
static void refresh_backlight_timeout(); static void refresh_backlight_timeout();

View file

@ -206,16 +206,17 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS EEPROM_BOO
exec_test $1 $2 "MEGA2560 RAMPS | Laser Feature | Air Evacuation | Air Assist | Cooler | Laser Safety Timeout | Flowmeter | 44780 LCD " "$3" exec_test $1 $2 "MEGA2560 RAMPS | Laser Feature | Air Evacuation | Air Assist | Cooler | Laser Safety Timeout | Flowmeter | 44780 LCD " "$3"
# #
# Test redundant temperature sensors + MAX TC # Test redundant temperature sensors + MAX TC + Backlight Timeout
# #
restore_configs restore_configs
opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 1 \ opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 1 \
TEMP_SENSOR_0 -2 TEMP_SENSOR_REDUNDANT -2 \ TEMP_SENSOR_0 -2 TEMP_SENSOR_REDUNDANT -2 \
TEMP_SENSOR_REDUNDANT_SOURCE E1 TEMP_SENSOR_REDUNDANT_TARGET E0 \ TEMP_SENSOR_REDUNDANT_SOURCE E1 TEMP_SENSOR_REDUNDANT_TARGET E0 \
TEMP_0_CS_PIN 11 TEMP_1_CS_PIN 12 TEMP_0_CS_PIN 11 TEMP_1_CS_PIN 12 \
opt_enable MPCTEMP LCD_BACKLIGHT_TIMEOUT 30
opt_enable MPCTEMP MINIPANEL
opt_disable PIDTEMP opt_disable PIDTEMP
exec_test $1 $2 "MEGA2560 RAMPS | Redundant temperature sensor | 2x MAX6675" "$3" exec_test $1 $2 "MEGA2560 RAMPS | Redundant temperature sensor | 2x MAX6675 | BL Timeout" "$3"
# #
# Polargraph Config # Polargraph Config