Merge pull request #3475 from gudnimg/custom_message_m601
Make M117 message persistent on LCD when used with M601 or G4
This commit is contained in:
commit
29159a5bf3
@ -4264,7 +4264,7 @@ void process_commands()
|
||||
if (starpos != NULL)
|
||||
*(starpos) = '\0';
|
||||
lcd_setstatus(strchr_pointer + 5);
|
||||
custom_message_type = CustomMsg::MsgUpdate;
|
||||
custom_message_type = CustomMsg::M117;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -4762,7 +4762,13 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
|
||||
codenum = 0;
|
||||
if(code_seen('P')) codenum = code_value(); // milliseconds to wait
|
||||
if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
|
||||
if(codenum != 0) LCD_MESSAGERPGM(_n("Sleep..."));////MSG_DWELL
|
||||
if(codenum != 0)
|
||||
{
|
||||
if(custom_message_type != CustomMsg::M117)
|
||||
{
|
||||
LCD_MESSAGERPGM(_n("Sleep..."));////MSG_DWELL
|
||||
}
|
||||
}
|
||||
st_synchronize();
|
||||
codenum += _millis(); // keep track of when we started waiting
|
||||
previous_millis_cmd.start();
|
||||
|
@ -618,7 +618,7 @@ void lcdui_print_status_line(void)
|
||||
}
|
||||
} else { // Otherwise check for other special events
|
||||
switch (custom_message_type) {
|
||||
case CustomMsg::MsgUpdate: //Short message even while printing from SD
|
||||
case CustomMsg::M117: // M117 Set the status line message on the LCD
|
||||
case CustomMsg::Status: // Nothing special, print status message normally
|
||||
case CustomMsg::M0Wait: // M0/M1 Wait command working even from SD
|
||||
lcd_print(lcd_status_message);
|
||||
@ -875,10 +875,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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,8 +121,8 @@ enum class CustomMsg : uint_least8_t
|
||||
TempCal, //!< PINDA temperature calibration
|
||||
TempCompPreheat, //!< Temperature compensation preheat
|
||||
M0Wait, //!< M0/M1 Wait command working even from SD
|
||||
MsgUpdate, //!< Short message even while printing from SD
|
||||
Resuming, //!< Resuming message
|
||||
M117, //!< M117 Set the status line message on the LCD
|
||||
Resuming, //!< Resuming message
|
||||
};
|
||||
|
||||
extern CustomMsg custom_message_type;
|
||||
|
Loading…
Reference in New Issue
Block a user