Przeglądaj źródła

Add hotEnough methods

Scott Lahteine 7 lat temu
rodzic
commit
61bf8478a2

+ 2
- 2
Marlin/src/feature/pause.cpp Wyświetl plik

287
   COPY(resume_position, current_position);
287
   COPY(resume_position, current_position);
288
 
288
 
289
   // Initial retract before move to filament change position
289
   // Initial retract before move to filament change position
290
-  if (retract && !thermalManager.tooColdToExtrude(active_extruder))
290
+  if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
291
     do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
291
     do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
292
 
292
 
293
   // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
293
   // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
397
     thermalManager.reset_heater_idle_timer(e);
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
     // Load the new filament
401
     // Load the new filament
402
     load_filament(load_length, extrude_length, max_beep_count, true, nozzle_timed_out);
402
     load_filament(load_length, extrude_length, max_beep_count, true, nozzle_timed_out);
403
   }
403
   }

+ 13
- 13
Marlin/src/lcd/ultralcd.cpp Wyświetl plik

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

+ 3
- 0
Marlin/src/module/temperature.h Wyświetl plik

188
       FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) { UNUSED(e); return false; }
188
       FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t e) { UNUSED(e); return false; }
189
     #endif
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
   private:
194
   private:
192
 
195
 
193
     #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
196
     #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)

Ładowanie…
Anuluj
Zapisz