Browse Source

Enable M191 (#15531)

Bo Herrmannsen 5 years ago
parent
commit
0d7736d663

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

446
 
446
 
447
       #if HAS_HEATED_CHAMBER
447
       #if HAS_HEATED_CHAMBER
448
         case 141: M141(); break;                                  // M141: Set chamber temperature
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
       #endif
450
       #endif
451
 
451
 
452
       #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR
452
       #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR

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

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

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

27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 #include "../../module/temperature.h"
28
 #include "../../module/temperature.h"
29
 
29
 
30
-/*
31
 #include "../../module/motion.h"
30
 #include "../../module/motion.h"
32
 #include "../../lcd/ultralcd.h"
31
 #include "../../lcd/ultralcd.h"
33
 
32
 
40
 #endif
39
 #endif
41
 
40
 
42
 #include "../../Marlin.h" // for wait_for_heatup and idle()
41
 #include "../../Marlin.h" // for wait_for_heatup and idle()
43
-*/
44
 
42
 
45
 /**
43
 /**
46
  * M141: Set chamber temperature
44
  * M141: Set chamber temperature
54
  * M191: Sxxx Wait for chamber current temp to reach target temp. Waits only when heating
52
  * M191: Sxxx Wait for chamber current temp to reach target temp. Waits only when heating
55
  *       Rxxx Wait for chamber current temp to reach target temp. Waits when heating and cooling
53
  *       Rxxx Wait for chamber current temp to reach target temp. Waits when heating and cooling
56
  */
54
  */
57
-/*
58
 void GcodeSuite::M191() {
55
 void GcodeSuite::M191() {
59
   if (DEBUGGING(DRYRUN)) return;
56
   if (DEBUGGING(DRYRUN)) return;
60
 
57
 
68
   }
65
   }
69
   else return;
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
 #endif // HAS_HEATED_CHAMBER
75
 #endif // HAS_HEATED_CHAMBER

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

3160
 
3160
 
3161
   #endif // HAS_HEATED_BED
3161
   #endif // HAS_HEATED_BED
3162
 
3162
 
3163
-  #if 0 && HAS_HEATED_CHAMBER
3163
+  #if HAS_HEATED_CHAMBER
3164
 
3164
 
3165
     #ifndef MIN_COOLING_SLOPE_DEG_CHAMBER
3165
     #ifndef MIN_COOLING_SLOPE_DEG_CHAMBER
3166
       #define MIN_COOLING_SLOPE_DEG_CHAMBER 1.50
3166
       #define MIN_COOLING_SLOPE_DEG_CHAMBER 1.50

Loading…
Cancel
Save