🐛 Fix M140 print job timer autostart (#22046)

This commit is contained in:
Taylor Talkington 2021-06-05 00:01:06 -04:00 committed by GitHub
parent a6125b859d
commit c2c771a1cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View file

@ -1824,11 +1824,20 @@
/**
* Print Job Timer
*
* Automatically start and stop the print job timer on M104/M109/M190.
* Automatically start and stop the print job timer on M104/M109/M140/M190/M141/M191.
* The print job timer will only be stopped if the bed/chamber target temp is
* below BED_MINTEMP/CHAMBER_MINTEMP.
*
* M104 (hotend, no wait) - high temp = none, low temp = stop timer
* M109 (hotend, wait) - high temp = start timer, low temp = stop timer
* M190 (bed, wait) - high temp = start timer, low temp = none
* M104 (hotend, no wait) - high temp = none, low temp = stop timer
* M109 (hotend, wait) - high temp = start timer, low temp = stop timer
* M140 (bed, no wait) - high temp = none, low temp = stop timer
* M190 (bed, wait) - high temp = start timer, low temp = none
* M141 (chamber, no wait) - high temp = none, low temp = stop timer
* M191 (chamber, wait) - high temp = start timer, low temp = none
*
* For M104/M109, high temp is anything over EXTRUDE_MINTEMP / 2.
* For M140/M190, high temp is anything over BED_MINTEMP.
* For M141/M191, high temp is anything over CHAMBER_MINTEMP.
*
* The timer can also be controlled with the following commands:
*

View file

@ -83,10 +83,11 @@ void GcodeSuite::M140_M190(const bool isM190) {
thermalManager.setTargetBed(temp);
TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.auto_job_check_timer(true, false));
ui.set_status_P(thermalManager.isHeatingBed() ? GET_TEXT(MSG_BED_HEATING) : GET_TEXT(MSG_BED_COOLING));
// with PRINTJOB_TIMER_AUTOSTART, M190 can start the timer, and M140 can stop it
TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.auto_job_check_timer(isM190, !isM190));
if (isM190)
thermalManager.wait_for_bed(no_wait_for_cooling);
}