Refactor heater watch, job timer auto-start (#16725)

This commit is contained in:
Scott Lahteine
2020-01-30 03:24:43 -06:00
committed by GitHub
parent 50889c0f94
commit 9caf5c05e7
7 changed files with 113 additions and 57 deletions

View File

@ -20,6 +20,12 @@
*
*/
/**
* gcode/temperature/M140_M190.cpp
*
* Bed target temperature control
*/
#include "../../inc/MarlinConfig.h"
#if HAS_HEATED_BED
@ -50,6 +56,8 @@ void GcodeSuite::M140() {
/**
* M190: Sxxx Wait for bed current temp to reach target temp. Waits only when heating
* Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
*
* With PRINTJOB_TIMER_AUTOSTART also start the job timer on heating.
*/
void GcodeSuite::M190() {
if (DEBUGGING(DRYRUN)) return;
@ -58,8 +66,7 @@ void GcodeSuite::M190() {
if (no_wait_for_cooling || parser.seenval('R')) {
thermalManager.setTargetBed(parser.value_celsius());
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
if (parser.value_celsius() > BED_MINTEMP)
startOrResumeJob();
thermalManager.check_timer_autostart(true, false);
#endif
}
else return;