Don't render message when printer is idle

Guard the lcd_display_message_fullscreen_P call by blocks_queued(). If there are no planned moves, there is no need to render this message, it creates a weird LCD draw noticable by the user.

Change in memory:
Flash: +10 bytes
SRAM: 0 bytes
This commit is contained in:
Guðni Már Gilbert 2023-04-23 09:43:23 +00:00 committed by Alex Voinea
parent 9de2cbfe8e
commit 5b7266fdf1
No known key found for this signature in database
GPG Key ID: 37EDFD565CB33BAD
1 changed files with 11 additions and 8 deletions

View File

@ -3377,10 +3377,13 @@ static void lcd_silent_mode_set() {
} }
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu); eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
#ifdef TMC2130 #ifdef TMC2130
if (blocks_queued())
{
lcd_display_message_fullscreen_P(_i("Mode change in progress..."));////MSG_MODE_CHANGE_IN_PROGRESS c=20 r=3 lcd_display_message_fullscreen_P(_i("Mode change in progress..."));////MSG_MODE_CHANGE_IN_PROGRESS c=20 r=3
// Wait until the planner queue is drained and the stepper routine achieves // Wait until the planner queue is drained and the stepper routine achieves
// an idle state. // an idle state.
st_synchronize(); st_synchronize();
}
tmc2130_wait_standstill_xy(1000); tmc2130_wait_standstill_xy(1000);
cli(); cli();
tmc2130_mode = (SilentModeMenu != SILENT_MODE_NORMAL)?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL; tmc2130_mode = (SilentModeMenu != SILENT_MODE_NORMAL)?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;