Browse Source

Enable M191 (#15531)

Bo Herrmannsen 5 years ago
parent
commit
0d7736d663

+ 1
- 1
Marlin/src/gcode/gcode.cpp View File

@@ -446,7 +446,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
446 446
 
447 447
       #if HAS_HEATED_CHAMBER
448 448
         case 141: M141(); break;                                  // M141: Set chamber temperature
449
-        //case 191: M191(); break;                                // M191: Wait for chamber temperature to reach target
449
+        case 191: M191(); break;                                  // M191: Wait for chamber temperature to reach target
450 450
       #endif
451 451
 
452 452
       #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR

+ 1
- 1
Marlin/src/gcode/gcode.h View File

@@ -620,7 +620,7 @@ private:
620 620
 
621 621
   #if HAS_HEATED_CHAMBER
622 622
     static void M141();
623
-    //static void M191();
623
+    static void M191();
624 624
   #endif
625 625
 
626 626
   #if HOTENDS && HAS_LCD_MENU

+ 5
- 7
Marlin/src/gcode/temperature/M141_M191.cpp View File

@@ -27,7 +27,6 @@
27 27
 #include "../gcode.h"
28 28
 #include "../../module/temperature.h"
29 29
 
30
-/*
31 30
 #include "../../module/motion.h"
32 31
 #include "../../lcd/ultralcd.h"
33 32
 
@@ -40,7 +39,6 @@
40 39
 #endif
41 40
 
42 41
 #include "../../Marlin.h" // for wait_for_heatup and idle()
43
-*/
44 42
 
45 43
 /**
46 44
  * M141: Set chamber temperature
@@ -54,7 +52,6 @@ void GcodeSuite::M141() {
54 52
  * M191: Sxxx Wait for chamber current temp to reach target temp. Waits only when heating
55 53
  *       Rxxx Wait for chamber current temp to reach target temp. Waits when heating and cooling
56 54
  */
57
-/*
58 55
 void GcodeSuite::M191() {
59 56
   if (DEBUGGING(DRYRUN)) return;
60 57
 
@@ -68,10 +65,11 @@ void GcodeSuite::M191() {
68 65
   }
69 66
   else return;
70 67
 
71
-  lcd_setstatusPGM(thermalManager.isHeatingChamber() ? GET_TEXT(MSG_CHAMBER_HEATING) : GET_TEXT(MSG_CHAMBER_COOLING));
72
-
73
-  thermalManager.wait_for_chamber(no_wait_for_cooling);
68
+  const bool is_heating = thermalManager.isHeatingChamber();
69
+  if (is_heating || !no_wait_for_cooling) {
70
+    lcd_setstatusPGM(is_heating ? GET_TEXT(MSG_CHAMBER_HEATING) : GET_TEXT(MSG_CHAMBER_COOLING));
71
+    thermalManager.wait_for_chamber(false);
72
+  }
74 73
 }
75
-*/
76 74
 
77 75
 #endif // HAS_HEATED_CHAMBER

+ 1
- 1
Marlin/src/module/temperature.cpp View File

@@ -3160,7 +3160,7 @@ void Temperature::isr() {
3160 3160
 
3161 3161
   #endif // HAS_HEATED_BED
3162 3162
 
3163
-  #if 0 && HAS_HEATED_CHAMBER
3163
+  #if HAS_HEATED_CHAMBER
3164 3164
 
3165 3165
     #ifndef MIN_COOLING_SLOPE_DEG_CHAMBER
3166 3166
       #define MIN_COOLING_SLOPE_DEG_CHAMBER 1.50

Loading…
Cancel
Save