Browse Source

Update print job timer with Chamber temp (#17552)

randellhodges 5 years ago
parent
commit
808f632997
No account linked to committer's email address
2 changed files with 23 additions and 10 deletions
  1. 11
    9
      Marlin/src/gcode/temp/M140_M190.cpp
  2. 12
    1
      Marlin/src/gcode/temp/M141_M191.cpp

+ 11
- 9
Marlin/src/gcode/temp/M140_M190.cpp View File

@@ -50,16 +50,18 @@
50 50
  */
51 51
 void GcodeSuite::M140() {
52 52
   if (DEBUGGING(DRYRUN)) return;
53
-  if (parser.seenval('S')) thermalManager.setTargetBed(parser.value_celsius());
53
+  if (parser.seenval('S')) {
54
+    thermalManager.setTargetBed(parser.value_celsius());
54 55
 
55
-  #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
56
-    /**
57
-     * Stop the timer at the end of print. Both hotend and bed target
58
-     * temperatures need to be set below mintemp. Order of M140 and M104
59
-     * at the end of the print does not matter.
60
-     */
61
-    thermalManager.check_timer_autostart(false, true);
62
-  #endif
56
+    #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
57
+      /**
58
+       * Stop the timer at the end of print. Hotend, bed target, and chamber
59
+       * temperatures need to be set below mintemp. Order of M140, M104, and M141
60
+       * at the end of the print does not matter.
61
+       */
62
+      thermalManager.check_timer_autostart(false, true);
63
+    #endif
64
+  }
63 65
 }
64 66
 
65 67
 /**

+ 12
- 1
Marlin/src/gcode/temp/M141_M191.cpp View File

@@ -51,7 +51,18 @@
51 51
  */
52 52
 void GcodeSuite::M141() {
53 53
   if (DEBUGGING(DRYRUN)) return;
54
-  if (parser.seenval('S')) thermalManager.setTargetChamber(parser.value_celsius());
54
+  if (parser.seenval('S')) {
55
+    thermalManager.setTargetChamber(parser.value_celsius());
56
+
57
+    #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
58
+      /**
59
+       * Stop the timer at the end of print. Hotend, bed target, and chamber
60
+       * temperatures need to be set below mintemp. Order of M140, M104, and M141
61
+       * at the end of the print does not matter.
62
+       */
63
+      thermalManager.check_timer_autostart(false, true);
64
+    #endif
65
+  }
55 66
 }
56 67
 
57 68
 /**

Loading…
Cancel
Save