Make M117 custom message persistant if print is paused

If M117 is called before M601 then we would like the custom message to
be visible on the LCD screen until the print is resumed.

Change in memory: +10 bytes of flash

Fixes 
This commit is contained in:
Guðni Már Gilbert 2022-04-17 14:00:41 +00:00
parent 9bb8797b60
commit c77b768fdd
3 changed files with 13 additions and 6 deletions
Firmware

View file

@ -676,6 +676,9 @@ void lcdui_print_status_line(void)
case CustomMsg::Resuming: //Resuming
lcd_puts_at_P(0, 3, _T(MSG_RESUMING_PRINT));
break;
case CustomMsg::M117:
lcd_print(lcd_status_message);
break;
}
}
@ -875,10 +878,13 @@ void lcd_commands()
{
if (!blocks_queued() && !homing_flag)
{
lcd_setstatuspgm(_i("Print paused"));////MSG_PRINT_PAUSED c=20
lcd_commands_type = LcdCommands::Idle;
lcd_commands_step = 0;
long_pause();
if (custom_message_type != CustomMsg::M117)
{
lcd_setstatuspgm(_i("Print paused"));////MSG_PRINT_PAUSED c=20
}
lcd_commands_type = LcdCommands::Idle;
lcd_commands_step = 0;
long_pause();
}
}