Minor code cleanup

This commit is contained in:
Scott Lahteine
2020-04-01 18:53:58 -05:00
parent 7f5dc7b919
commit 514afddeb4
8 changed files with 17 additions and 34 deletions

View File

@ -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

View File

@ -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)

View File

@ -441,7 +441,6 @@ void DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variab
DGUSLCD_SendStringToDisplay(var);
}
void DGUSScreenVariableHandler::SDCardInserted() {
top_file = 0;
auto cs = ScreenHandler.getCurrentScreen();

View File

@ -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();