Browse Source

Temperature 'autostart' => 'auto_job'

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
5bf82b34c6
  1. 4
      Marlin/src/gcode/temp/M104_M109.cpp
  2. 4
      Marlin/src/gcode/temp/M140_M190.cpp
  3. 4
      Marlin/src/gcode/temp/M141_M191.cpp
  4. 6
      Marlin/src/module/temperature.cpp
  5. 4
      Marlin/src/module/temperature.h

4
Marlin/src/gcode/temp/M104_M109.cpp

@ -105,7 +105,7 @@ void GcodeSuite::M104() {
* mode, for instance in a dual extruder setup, without affecting the running * mode, for instance in a dual extruder setup, without affecting the running
* print timer. * print timer.
*/ */
thermalManager.check_timer_autostart(false, true); thermalManager.auto_job_check_timer(false, true);
#endif #endif
} }
@ -182,7 +182,7 @@ void GcodeSuite::M109() {
* standby mode, (e.g., in a dual extruder setup) without affecting * standby mode, (e.g., in a dual extruder setup) without affecting
* the running print timer. * the running print timer.
*/ */
thermalManager.check_timer_autostart(true, true); thermalManager.auto_job_check_timer(true, true);
#endif #endif
#if HAS_DISPLAY #if HAS_DISPLAY

4
Marlin/src/gcode/temp/M140_M190.cpp

@ -81,7 +81,7 @@ void GcodeSuite::M140() {
* temperatures need to be set below mintemp. Order of M140, M104, and M141 * temperatures need to be set below mintemp. Order of M140, M104, and M141
* at the end of the print does not matter. * at the end of the print does not matter.
*/ */
thermalManager.check_timer_autostart(false, true); thermalManager.auto_job_check_timer(false, true);
#endif #endif
} }
} }
@ -128,7 +128,7 @@ void GcodeSuite::M190() {
thermalManager.setTargetBed(temp); thermalManager.setTargetBed(temp);
TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.check_timer_autostart(true, false)); 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)); ui.set_status_P(thermalManager.isHeatingBed() ? GET_TEXT(MSG_BED_HEATING) : GET_TEXT(MSG_BED_COOLING));

4
Marlin/src/gcode/temp/M141_M191.cpp

@ -60,7 +60,7 @@ void GcodeSuite::M141() {
* temperatures need to be set below mintemp. Order of M140, M104, and M141 * temperatures need to be set below mintemp. Order of M140, M104, and M141
* at the end of the print does not matter. * at the end of the print does not matter.
*/ */
thermalManager.check_timer_autostart(false, true); thermalManager.auto_job_check_timer(false, true);
#endif #endif
} }
} }
@ -75,7 +75,7 @@ void GcodeSuite::M191() {
const bool no_wait_for_cooling = parser.seenval('S'); const bool no_wait_for_cooling = parser.seenval('S');
if (no_wait_for_cooling || parser.seenval('R')) { if (no_wait_for_cooling || parser.seenval('R')) {
thermalManager.setTargetChamber(parser.value_celsius()); thermalManager.setTargetChamber(parser.value_celsius());
TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.check_timer_autostart(true, false)); TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.auto_job_check_timer(true, false));
} }
else return; else return;

6
Marlin/src/module/temperature.cpp

@ -2154,7 +2154,7 @@ void Temperature::disable_all_heaters() {
#if ENABLED(PRINTJOB_TIMER_AUTOSTART) #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
bool Temperature::over_autostart_threshold() { bool Temperature::auto_job_over_threshold() {
#if HAS_HOTEND #if HAS_HOTEND
HOTEND_LOOP() if (degTargetHotend(e) > (EXTRUDE_MINTEMP) / 2) return true; HOTEND_LOOP() if (degTargetHotend(e) > (EXTRUDE_MINTEMP) / 2) return true;
#endif #endif
@ -2162,8 +2162,8 @@ void Temperature::disable_all_heaters() {
|| TERN0(HAS_HEATED_CHAMBER, degTargetChamber() > CHAMBER_MINTEMP); || TERN0(HAS_HEATED_CHAMBER, degTargetChamber() > CHAMBER_MINTEMP);
} }
void Temperature::check_timer_autostart(const bool can_start, const bool can_stop) { void Temperature::auto_job_check_timer(const bool can_start, const bool can_stop) {
if (over_autostart_threshold()) { if (auto_job_over_threshold()) {
if (can_start) startOrResumeJob(); if (can_start) startOrResumeJob();
} }
else if (can_stop) { else if (can_stop) {

4
Marlin/src/module/temperature.h

@ -731,8 +731,8 @@ class Temperature {
/** /**
* Methods to check if heaters are enabled, indicating an active job * Methods to check if heaters are enabled, indicating an active job
*/ */
static bool over_autostart_threshold(); static bool auto_job_over_threshold();
static void check_timer_autostart(const bool can_start, const bool can_stop); static void auto_job_check_timer(const bool can_start, const bool can_stop);
#endif #endif
/** /**

Loading…
Cancel
Save