Fix filament Change heading on LCD #15783
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed a misleading pause mode headers on LCD during investigation of #13564.
So, if you invoke M600 or run filament change from menu, than Marlin is displaying "PRINT PAUSED" header instead of "FILAMENT CHANGE" even there is no print currently running. This PR is trying to fix this behavior.
So, if pause_print() function is called with unload_length > 0, then pause_mode is set to PAUSE_MODE_CHANGE_FILAMENT, otherwise pause_mode remains PAUSE_MODE_PAUSE_PRINT.
load_filament() function from resume_print() will be called with PAUSE_MODE_SAME to not force PAUSE_MODE_PAUSE_PRINT. So, if pause_mode was previously set to PAUSE_MODE_CHANGE_FILAMENT, it will remain PAUSE_MODE_CHANGE_FILAMENT.