From c2c771a1ccbe2b61ef36e040613bd6176675d974 Mon Sep 17 00:00:00 2001 From: Taylor Talkington <taylor.talkington@gmail.com> Date: Sat, 5 Jun 2021 00:01:06 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20M140=20print=20job=20timer?= =?UTF-8?q?=20autostart=20(#22046)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 17 +++++++++++++---- Marlin/src/gcode/temp/M140_M190.cpp | 5 +++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 366267aa7e9..f724d8f34c4 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -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: * diff --git a/Marlin/src/gcode/temp/M140_M190.cpp b/Marlin/src/gcode/temp/M140_M190.cpp index ddab003973a..857e11dde53 100644 --- a/Marlin/src/gcode/temp/M140_M190.cpp +++ b/Marlin/src/gcode/temp/M140_M190.cpp @@ -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); }