Kaynağa Gözat

Add hotEnough methods

Scott Lahteine 7 yıl önce
ebeveyn
işleme
61bf8478a2

+ 2
- 2
Marlin/src/feature/pause.cpp Dosyayı Görüntüle

@@ -287,7 +287,7 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
287 287
   COPY(resume_position, current_position);
288 288
 
289 289
   // Initial retract before move to filament change position
290
-  if (retract && !thermalManager.tooColdToExtrude(active_extruder))
290
+  if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
291 291
     do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
292 292
 
293 293
   // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
@@ -397,7 +397,7 @@ void resume_print(const float &load_length/*=0*/, const float &extrude_length/*=
397 397
     thermalManager.reset_heater_idle_timer(e);
398 398
   }
399 399
 
400
-  if (nozzle_timed_out || !thermalManager.tooColdToExtrude(active_extruder)) {
400
+  if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
401 401
     // Load the new filament
402 402
     load_filament(load_length, extrude_length, max_beep_count, true, nozzle_timed_out);
403 403
   }

+ 13
- 13
Marlin/src/lcd/ultralcd.cpp Dosyayı Görüntüle

@@ -1402,7 +1402,7 @@ void kill_screen(const char* lcd_msg) {
1402 1402
     //
1403 1403
     #if ENABLED(ADVANCED_PAUSE_FEATURE)
1404 1404
       #if E_STEPPERS == 1 && !ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
1405
-        if (!thermalManager.targetTooColdToExtrude(active_extruder))
1405
+        if (thermalManager.targetHotEnoughToExtrude(active_extruder))
1406 1406
           MENU_ITEM(gcode, MSG_FILAMENTCHANGE, PSTR("M600 B0"));
1407 1407
         else
1408 1408
           MENU_ITEM(submenu, MSG_FILAMENTCHANGE, lcd_temp_menu_e0_filament_change);
@@ -2608,7 +2608,7 @@ void kill_screen(const char* lcd_msg) {
2608 2608
     #if ENABLED(ADVANCED_PAUSE_FEATURE)
2609 2609
       if (!IS_SD_FILE_OPEN) {
2610 2610
         #if E_STEPPERS == 1 && !ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
2611
-          if (!thermalManager.targetTooColdToExtrude(active_extruder))
2611
+          if (thermalManager.targetHotEnoughToExtrude(active_extruder))
2612 2612
             MENU_ITEM(gcode, MSG_FILAMENTCHANGE, PSTR("M600 B0"));
2613 2613
           else
2614 2614
             MENU_ITEM(submenu, MSG_FILAMENTCHANGE, lcd_temp_menu_e0_filament_change);
@@ -4282,21 +4282,21 @@ void kill_screen(const char* lcd_msg) {
4282 4282
 
4283 4283
             // Unload filament
4284 4284
             #if E_STEPPERS == 1
4285
-              if (!thermalManager.targetTooColdToExtrude(active_extruder))
4285
+              if (thermalManager.targetHotEnoughToExtrude(active_extruder))
4286 4286
                 MENU_ITEM(gcode, MSG_FILAMENTUNLOAD, PSTR("M702"));
4287 4287
               else
4288 4288
                 MENU_ITEM(submenu, MSG_FILAMENTUNLOAD, lcd_temp_menu_e0_filament_unload);
4289 4289
             #else
4290 4290
               #if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS)
4291
-                if (!thermalManager.targetTooColdToExtrude(0)
4291
+                if (thermalManager.targetHotEnoughToExtrude(0)
4292 4292
                   #if E_STEPPERS > 1
4293
-                    && !thermalManager.targetTooColdToExtrude(1)
4293
+                    && thermalManager.targetHotEnoughToExtrude(1)
4294 4294
                     #if E_STEPPERS > 2
4295
-                      && !thermalManager.targetTooColdToExtrude(2)
4295
+                      && thermalManager.targetHotEnoughToExtrude(2)
4296 4296
                       #if E_STEPPERS > 3
4297
-                        && !thermalManager.targetTooColdToExtrude(3)
4297
+                        && thermalManager.targetHotEnoughToExtrude(3)
4298 4298
                         #if E_STEPPERS > 4
4299
-                          && !thermalManager.targetTooColdToExtrude(4)
4299
+                          && thermalManager.targetHotEnoughToExtrude(4)
4300 4300
                         #endif // E_STEPPERS > 4
4301 4301
                       #endif // E_STEPPERS > 3
4302 4302
                     #endif // E_STEPPERS > 2
@@ -4306,26 +4306,26 @@ void kill_screen(const char* lcd_msg) {
4306 4306
               else
4307 4307
                 MENU_ITEM(submenu, MSG_FILAMENTUNLOAD_ALL, lcd_unload_filament_all_temp_menu);
4308 4308
               #endif
4309
-              if (!thermalManager.targetTooColdToExtrude(0))
4309
+              if (thermalManager.targetHotEnoughToExtrude(0))
4310 4310
                 MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E1, PSTR("M702 T0"));
4311 4311
               else
4312 4312
                 MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E1, lcd_temp_menu_e0_filament_unload);
4313
-              if (!thermalManager.targetTooColdToExtrude(1))
4313
+              if (thermalManager.targetHotEnoughToExtrude(1))
4314 4314
                 MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E2, PSTR("M702 T1"));
4315 4315
               else
4316 4316
                 MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E2, lcd_temp_menu_e1_filament_unload);
4317 4317
               #if E_STEPPERS > 2
4318
-                if (!thermalManager.targetTooColdToExtrude(2))
4318
+                if (thermalManager.targetHotEnoughToExtrude(2))
4319 4319
                   MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E3, PSTR("M702 T2"));
4320 4320
                 else
4321 4321
                   MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E3, lcd_temp_menu_e2_filament_unload);
4322 4322
                 #if E_STEPPERS > 3
4323
-                  if (!thermalManager.targetTooColdToExtrude(3))
4323
+                  if (thermalManager.targetHotEnoughToExtrude(3))
4324 4324
                     MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E4, PSTR("M702 T3"));
4325 4325
                   else
4326 4326
                     MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E4, lcd_temp_menu_e3_filament_unload);
4327 4327
                   #if E_STEPPERS > 4
4328
-                    if (!thermalManager.targetTooColdToExtrude(4))
4328
+                    if (thermalManager.targetHotEnoughToExtrude(4))
4329 4329
                       MENU_ITEM(gcode, MSG_FILAMENTUNLOAD " " MSG_E5, PSTR("M702 T4"));
4330 4330
                     else
4331 4331
                       MENU_ITEM(submenu, MSG_FILAMENTUNLOAD " " MSG_E5, lcd_temp_menu_e4_filament_unload);

+ 3
- 0
Marlin/src/module/temperature.h Dosyayı Görüntüle

@@ -188,6 +188,9 @@ class Temperature {
188 188
       FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) { UNUSED(e); return false; }
189 189
     #endif
190 190
 
191
+    FORCE_INLINE static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); }
192
+    FORCE_INLINE static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); }
193
+
191 194
   private:
192 195
 
193 196
     #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)

Loading…
İptal
Kaydet