From e2d0e9a2ee1acfd9f42cdc16c10d0f5e96279071 Mon Sep 17 00:00:00 2001 From: gudnimg Date: Sat, 25 Nov 2023 14:41:57 +0000 Subject: [PATCH] power panic: remove redundant lcd update calls lcd_show_fullscreen_message_yes_no_and_wait_P will enable LCD update upon exit. Change in memory: Flash: -24 bytes SRAM: 0 bytes --- Firmware/Marlin_main.cpp | 9 ++++----- Firmware/power_panic.cpp | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index c91d309dd..49f848d20 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -1595,12 +1595,11 @@ void setup() #ifdef DEBUG_UVLO_AUTOMATIC_RECOVER puts_P(_N("Normal recovery!")); #endif - if ( lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_RECOVER_PRINT), false) == LCD_LEFT_BUTTON_CHOICE) { - recover_print(0); - } else { + const uint8_t btn = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_RECOVER_PRINT), false); + if ( btn == LCD_LEFT_BUTTON_CHOICE) { + recover_print(0); + } else { // LCD_MIDDLE_BUTTON_CHOICE eeprom_update_byte((uint8_t*)EEPROM_UVLO, PowerPanic::NO_PENDING_RECOVERY); - lcd_update_enable(true); - lcd_update(2); lcd_setstatuspgm(MSG_WELCOME); } } diff --git a/Firmware/power_panic.cpp b/Firmware/power_panic.cpp index da49074fc..75ade9878 100644 --- a/Firmware/power_panic.cpp +++ b/Firmware/power_panic.cpp @@ -316,8 +316,6 @@ ISR(INT4_vect) { } void recover_print(uint8_t automatic) { - lcd_update_enable(true); - lcd_update(2); lcd_setstatuspgm(_i("Recovering print"));////MSG_RECOVERING_PRINT c=20 // Recover position, temperatures and extrude_multipliers