Minor code cleanup
This commit is contained in:
@ -367,11 +367,11 @@ void MarlinUI::init_lcd() {
|
||||
}
|
||||
|
||||
bool MarlinUI::detected() {
|
||||
return true
|
||||
return (true
|
||||
#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE)
|
||||
&& lcd.LcdDetected() == 1
|
||||
#endif
|
||||
;
|
||||
);
|
||||
}
|
||||
|
||||
#if HAS_SLOW_BUTTONS
|
||||
|
@ -244,13 +244,7 @@ void MarlinUI::init_lcd() {
|
||||
#if DISABLED(MKS_LCD12864B)
|
||||
|
||||
#if PIN_EXISTS(LCD_BACKLIGHT)
|
||||
OUT_WRITE(LCD_BACKLIGHT_PIN, (
|
||||
#if ENABLED(DELAYED_BACKLIGHT_INIT)
|
||||
LOW // Illuminate after reset
|
||||
#else
|
||||
HIGH // Illuminate right away
|
||||
#endif
|
||||
));
|
||||
OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
|
||||
#endif
|
||||
|
||||
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
|
||||
|
@ -441,7 +441,6 @@ void DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variab
|
||||
DGUSLCD_SendStringToDisplay(var);
|
||||
}
|
||||
|
||||
|
||||
void DGUSScreenVariableHandler::SDCardInserted() {
|
||||
top_file = 0;
|
||||
auto cs = ScreenHandler.getCurrentScreen();
|
||||
|
@ -351,10 +351,8 @@ void MarlinUI::init() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_ENCODER_ACTION
|
||||
#if HAS_SLOW_BUTTONS
|
||||
slow_buttons = 0;
|
||||
#endif
|
||||
#if HAS_ENCODER_ACTION && HAS_SLOW_BUTTONS
|
||||
slow_buttons = 0;
|
||||
#endif
|
||||
|
||||
update_buttons();
|
||||
|
Reference in New Issue
Block a user