Browse Source

Merge pull request #9290 from thinkyhead/bf2_print_start_fix

[2.0.x] Minor filament change improvements
Scott Lahteine 7 years ago
parent
commit
a19656e7cb
No account linked to committer's email address

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

336
 void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
336
 void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
337
 
337
 
338
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
338
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
339
-    if ((IS_SD_PRINTING || print_job_timer.isRunning()) && (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING))
339
+    if ((IS_SD_PRINTING || print_job_timer.isRunning())
340
+      && READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING
341
+      && thermalManager.targetHotEnoughToExtrude(active_extruder)
342
+    )
340
       handle_filament_runout();
343
       handle_filament_runout();
341
   #endif
344
   #endif
342
 
345
 

+ 86
- 16
Marlin/src/feature/pause.cpp View File

83
   }
83
   }
84
 #endif
84
 #endif
85
 
85
 
86
+/**
87
+ * Ensure a safe temperature for extrusion
88
+ *
89
+ * - Fail if the TARGET temperature is too low
90
+ * - Display LCD placard with temperature status
91
+ * - Return when heating is done or aborted
92
+ *
93
+ * Returns 'true' if heating was completed, 'false' for abort
94
+ */
86
 static bool ensure_safe_temperature(const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT) {
95
 static bool ensure_safe_temperature(const AdvancedPauseMode mode=ADVANCED_PAUSE_MODE_PAUSE_PRINT) {
87
 
96
 
88
   #if ENABLED(PREVENT_COLD_EXTRUSION)
97
   #if ENABLED(PREVENT_COLD_EXTRUSION)
115
   set_current_from_destination();
124
   set_current_from_destination();
116
 }
125
 }
117
 
126
 
118
-bool load_filament(const float &load_length/*=0*/, const float &extrude_length/*=0*/, const int8_t max_beep_count/*=0*/,
127
+/**
128
+ * Load filament into the hotend
129
+ *
130
+ * - Fail if the a safe temperature was not reached
131
+ * - If pausing for confirmation, wait for a click or M108
132
+ * - Show "wait for load" placard
133
+ * - Load and purge filament
134
+ * - Show "Purge more" / "Continue" menu
135
+ * - Return when "Continue" is selected
136
+ *
137
+ * Returns 'true' if load was completed, 'false' for abort
138
+ */
139
+bool load_filament(const float &load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/,
119
                           const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
140
                           const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/,
120
                           const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
141
                           const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
121
 ) {
142
 ) {
158
   }
179
   }
159
 
180
 
160
   #if ENABLED(ULTIPANEL)
181
   #if ENABLED(ULTIPANEL)
161
-    if (show_lcd) // Show "load" message
182
+    if (show_lcd) // Show "wait for load" message
162
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
183
       lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
163
   #endif
184
   #endif
164
 
185
 
165
   // Load filament
186
   // Load filament
166
-  do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE);
187
+  if (load_length) do_pause_e_move(load_length, FILAMENT_CHANGE_LOAD_FEEDRATE);
167
 
188
 
168
   do {
189
   do {
169
-    if (extrude_length > 0) {
190
+    if (purge_length > 0) {
170
       // "Wait for filament purge"
191
       // "Wait for filament purge"
171
       #if ENABLED(ULTIPANEL)
192
       #if ENABLED(ULTIPANEL)
172
         if (show_lcd)
193
         if (show_lcd)
174
       #endif
195
       #endif
175
 
196
 
176
       // Extrude filament to get into hotend
197
       // Extrude filament to get into hotend
177
-      do_pause_e_move(extrude_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
198
+      do_pause_e_move(purge_length, ADVANCED_PAUSE_EXTRUDE_FEEDRATE);
178
     }
199
     }
179
 
200
 
180
-    // Show "Extrude More" / "Resume" menu and wait for reply
201
+    // Show "Purge More" / "Resume" menu and wait for reply
181
     #if ENABLED(ULTIPANEL)
202
     #if ENABLED(ULTIPANEL)
182
       if (show_lcd) {
203
       if (show_lcd) {
183
         KEEPALIVE_STATE(PAUSED_FOR_USER);
204
         KEEPALIVE_STATE(PAUSED_FOR_USER);
188
       }
209
       }
189
     #endif
210
     #endif
190
 
211
 
191
-    // Keep looping if "Extrude More" was selected
212
+    // Keep looping if "Purge More" was selected
192
   } while (
213
   } while (
193
     #if ENABLED(ULTIPANEL)
214
     #if ENABLED(ULTIPANEL)
194
       show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
215
       show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
200
   return true;
221
   return true;
201
 }
222
 }
202
 
223
 
224
+/**
225
+ * Unload filament from the hotend
226
+ *
227
+ * - Fail if the a safe temperature was not reached
228
+ * - Show "wait for unload" placard
229
+ * - Retract, pause, then unload filament
230
+ * - Disable E stepper (on most machines)
231
+ *
232
+ * Returns 'true' if unload was completed, 'false' for abort
233
+ */
203
 bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
234
 bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
204
                             const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
235
                             const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
205
 ) {
236
 ) {
242
 
273
 
243
 // public:
274
 // public:
244
 
275
 
276
+/**
277
+ * Pause procedure
278
+ *
279
+ * - Abort if already paused
280
+ * - Send host action for pause, if configured
281
+ * - Abort if TARGET temperature is too low
282
+ * - Display "wait for start of filament change" (if a length was specified)
283
+ * - Initial retract, if current temperature is hot enough
284
+ * - Park the nozzle at the given position
285
+ * - Call unload_filament (if a length was specified)
286
+ *
287
+ * Returns 'true' if pause was completed, 'false' for abort
288
+ */
245
 uint8_t did_pause_print = 0;
289
 uint8_t did_pause_print = 0;
246
 
290
 
247
 bool pause_print(const float &retract, const point_t &park_point, const float &unload_length/*=0*/, const bool show_lcd/*=false*/) {
291
 bool pause_print(const float &retract, const point_t &park_point, const float &unload_length/*=0*/, const bool show_lcd/*=false*/) {
261
     SERIAL_ERRORLNPGM(MSG_HOTEND_TOO_COLD);
305
     SERIAL_ERRORLNPGM(MSG_HOTEND_TOO_COLD);
262
 
306
 
263
     #if ENABLED(ULTIPANEL)
307
     #if ENABLED(ULTIPANEL)
264
-      if (show_lcd) // Show status screen
308
+      if (show_lcd) { // Show status screen
265
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
309
         lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
310
+        LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
311
+      }
266
     #endif
312
     #endif
267
 
313
 
268
     return false; // unable to reach safe temperature
314
     return false; // unable to reach safe temperature
275
   #if ENABLED(SDSUPPORT)
321
   #if ENABLED(SDSUPPORT)
276
     if (card.sdprinting) {
322
     if (card.sdprinting) {
277
       card.pauseSDPrint();
323
       card.pauseSDPrint();
278
-      ++did_pause_print;
324
+      ++did_pause_print; // Indicate SD pause also
279
     }
325
     }
280
   #endif
326
   #endif
281
   print_job_timer.pause();
327
   print_job_timer.pause();
287
   COPY(resume_position, current_position);
333
   COPY(resume_position, current_position);
288
 
334
 
289
   // Initial retract before move to filament change position
335
   // Initial retract before move to filament change position
290
-  if (retract && !thermalManager.tooColdToExtrude(active_extruder))
336
+  if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
291
     do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
337
     do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
292
 
338
 
293
   // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
339
   // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
300
   return true;
346
   return true;
301
 }
347
 }
302
 
348
 
349
+/**
350
+ * - Show "Insert filament and press button to continue"
351
+ * - Wait for a click before returning
352
+ * - Heaters can time out, reheated before accepting a click
353
+ *
354
+ * Used by M125 and M600
355
+ */
303
 void wait_for_filament_reload(const int8_t max_beep_count/*=0*/) {
356
 void wait_for_filament_reload(const int8_t max_beep_count/*=0*/) {
304
   bool nozzle_timed_out = false;
357
   bool nozzle_timed_out = false;
305
 
358
 
386
   KEEPALIVE_STATE(IN_HANDLER);
439
   KEEPALIVE_STATE(IN_HANDLER);
387
 }
440
 }
388
 
441
 
389
-void resume_print(const float &load_length/*=0*/, const float &extrude_length/*=ADVANCED_PAUSE_EXTRUDE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
390
-  bool nozzle_timed_out = false;
391
-
442
+/**
443
+ * Resume or Start print procedure
444
+ *
445
+ * - Abort if not paused
446
+ * - Reset heater idle timers
447
+ * - Load filament if specified, but only if:
448
+ *   - a nozzle timed out, or
449
+ *   - the nozzle is already heated.
450
+ * - Display "wait for print to resume"
451
+ * - Re-prime the nozzle...
452
+ *   -  FWRETRACT: Recover/prime from the prior G10.
453
+ *   - !FWRETRACT: Retract by resume_position[E], if negative.
454
+ *                 Not sure how this logic comes into use.
455
+ * - Move the nozzle back to resume_position
456
+ * - Sync the planner E to resume_position[E]
457
+ * - Send host action for resume, if configured
458
+ * - Resume the current SD print job, if any
459
+ */
460
+void resume_print(const float &load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_EXTRUDE_LENGTH*/, const int8_t max_beep_count/*=0*/) {
392
   if (!did_pause_print) return;
461
   if (!did_pause_print) return;
393
 
462
 
394
   // Re-enable the heaters if they timed out
463
   // Re-enable the heaters if they timed out
464
+  bool nozzle_timed_out = false;
395
   HOTEND_LOOP() {
465
   HOTEND_LOOP() {
396
     nozzle_timed_out |= thermalManager.is_heater_idle(e);
466
     nozzle_timed_out |= thermalManager.is_heater_idle(e);
397
     thermalManager.reset_heater_idle_timer(e);
467
     thermalManager.reset_heater_idle_timer(e);
398
   }
468
   }
399
 
469
 
400
-  if (nozzle_timed_out || !thermalManager.tooColdToExtrude(active_extruder)) {
470
+  if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) {
401
     // Load the new filament
471
     // Load the new filament
402
-    load_filament(load_length, extrude_length, max_beep_count, true, nozzle_timed_out);
472
+    load_filament(load_length, purge_length, max_beep_count, true, nozzle_timed_out);
403
   }
473
   }
404
 
474
 
405
   #if ENABLED(ULTIPANEL)
475
   #if ENABLED(ULTIPANEL)
413
     if (fwretract.retracted[active_extruder])
483
     if (fwretract.retracted[active_extruder])
414
       do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
484
       do_pause_e_move(-fwretract.retract_length, fwretract.retract_feedrate_mm_s);
415
   #else
485
   #else
416
-    // If resume_position negative
486
+    // If resume_position is negative
417
     if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
487
     if (resume_position[E_AXIS] < 0) do_pause_e_move(resume_position[E_AXIS], PAUSE_PARK_RETRACT_FEEDRATE);
418
   #endif
488
   #endif
419
 
489
 

+ 3
- 3
Marlin/src/gcode/feature/pause/M125.cpp View File

50
  */
50
  */
51
 void GcodeSuite::M125() {
51
 void GcodeSuite::M125() {
52
   // Initial retract before move to filament change position
52
   // Initial retract before move to filament change position
53
-  const float retract = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
53
+  const float retract = -FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0
54
     #ifdef PAUSE_PARK_RETRACT_LENGTH
54
     #ifdef PAUSE_PARK_RETRACT_LENGTH
55
-      - (PAUSE_PARK_RETRACT_LENGTH)
55
+      + (PAUSE_PARK_RETRACT_LENGTH)
56
     #endif
56
     #endif
57
-  ;
57
+  );
58
 
58
 
59
   point_t park_point = NOZZLE_PARK_POINT;
59
   point_t park_point = NOZZLE_PARK_POINT;
60
 
60
 

+ 1
- 1
Marlin/src/gcode/feature/pause/M600.cpp View File

56
 
56
 
57
   if (get_target_extruder_from_command()) return;
57
   if (get_target_extruder_from_command()) return;
58
 
58
 
59
-  // Show initial message
59
+  // Show initial "wait for start" message
60
   #if ENABLED(ULTIPANEL)
60
   #if ENABLED(ULTIPANEL)
61
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, target_extruder);
61
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT, target_extruder);
62
   #endif
62
   #endif

+ 2
- 2
Marlin/src/gcode/feature/pause/M701_M702.cpp View File

59
   const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) :
59
   const float load_length = FABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) :
60
                                                     filament_change_load_length[target_extruder]);
60
                                                     filament_change_load_length[target_extruder]);
61
 
61
 
62
-  // Show initial message
62
+  // Show initial "wait for load" message
63
   #if ENABLED(ULTIPANEL)
63
   #if ENABLED(ULTIPANEL)
64
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
64
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, ADVANCED_PAUSE_MODE_LOAD_FILAMENT, target_extruder);
65
   #endif
65
   #endif
112
   // Z axis lift
112
   // Z axis lift
113
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
113
   if (parser.seenval('Z')) park_point.z = parser.linearval('Z');
114
 
114
 
115
-  // Show initial message
115
+  // Show initial "wait for unload" message
116
   #if ENABLED(ULTIPANEL)
116
   #if ENABLED(ULTIPANEL)
117
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, target_extruder);
117
     lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_UNLOAD, ADVANCED_PAUSE_MODE_UNLOAD_FILAMENT, target_extruder);
118
   #endif
118
   #endif

+ 3
- 0
Marlin/src/lcd/language/language_en.h View File

959
 #ifndef MSG_ERR_PROBING_FAILED
959
 #ifndef MSG_ERR_PROBING_FAILED
960
   #define MSG_ERR_PROBING_FAILED              _UxGT("Probing failed")
960
   #define MSG_ERR_PROBING_FAILED              _UxGT("Probing failed")
961
 #endif
961
 #endif
962
+#ifndef MSG_M600_TOO_COLD
963
+  #define MSG_M600_TOO_COLD                   _UxGT("M600: Too cold")
964
+#endif
962
 
965
 
963
 //
966
 //
964
 // Filament Change screens show up to 3 lines on a 4-line display
967
 // Filament Change screens show up to 3 lines on a 4-line display

+ 13
- 13
Marlin/src/lcd/ultralcd.cpp View File

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 View File

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)

Loading…
Cancel
Save