Quellcode durchsuchen

Allow bypass for cold E movement (#19606)

Cory Ory vor 4 Jahren
Ursprung
Commit
31238de937
3 geänderte Dateien mit 62 neuen und 44 gelöschten Zeilen
  1. 48
    31
      Marlin/src/lcd/menu/menu_motion.cpp
  2. 1
    9
      buildroot/tests/mega1280-tests
  3. 13
    4
      buildroot/tests/mega2560-tests

+ 48
- 31
Marlin/src/lcd/menu/menu_motion.cpp Datei anzeigen

@@ -170,11 +170,6 @@ void _goto_manual_move(const float scale) {
170 170
 
171 171
 void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int8_t eindex=-1) {
172 172
   _manual_move_func_ptr = func;
173
-  #if ENABLED(PREVENT_COLD_EXTRUSION)
174
-    const bool too_cold = axis == E_AXIS && thermalManager.tooColdToExtrude(eindex >= 0 ? eindex : active_extruder);
175
-  #else
176
-    constexpr bool too_cold = false;
177
-  #endif
178 173
   START_MENU();
179 174
   if (LCD_HEIGHT >= 4) {
180 175
     switch (axis) {
@@ -187,35 +182,57 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
187 182
         break;
188 183
     }
189 184
   }
190
-  if (too_cold)
191
-    BACK_ITEM(MSG_HOTEND_TOO_COLD);
192
-  else {
193
-    BACK_ITEM(MSG_MOVE_AXIS);
194
-    SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10);    });
195
-    SUBMENU(MSG_MOVE_1MM,  []{ _goto_manual_move( 1);    });
196
-    SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
197
-    if (axis == Z_AXIS && (SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
198
-      // Determine digits needed right of decimal
199
-      constexpr uint8_t digs = !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 1000 - int((SHORT_MANUAL_Z_MOVE) * 1000)) ? 4 :
200
-                               !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) *  100 - int((SHORT_MANUAL_Z_MOVE) *  100)) ? 3 : 2;
201
-      PGM_P const label = GET_TEXT(MSG_MOVE_Z_DIST);
202
-      char tmp[strlen_P(label) + 10 + 1], numstr[10];
203
-      sprintf_P(tmp, label, dtostrf(SHORT_MANUAL_Z_MOVE, 1, digs, numstr));
204
-
205
-      #if DISABLED(HAS_GRAPHICAL_TFT)
206
-        extern const char NUL_STR[];
207
-        SUBMENU_P(NUL_STR, []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
208
-        MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780));
209
-        lcd_put_u8str(tmp);
210
-        MENU_ITEM_ADDON_END();
211
-      #else
212
-        SUBMENU_P(tmp, []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
213
-      #endif
214
-    }
185
+
186
+  BACK_ITEM(MSG_MOVE_AXIS);
187
+  SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10);    });
188
+  SUBMENU(MSG_MOVE_1MM,  []{ _goto_manual_move( 1);    });
189
+  SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
190
+  if (axis == Z_AXIS && (SHORT_MANUAL_Z_MOVE) > 0.0f && (SHORT_MANUAL_Z_MOVE) < 0.1f) {
191
+    // Determine digits needed right of decimal
192
+    constexpr uint8_t digs = !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) * 1000 - int((SHORT_MANUAL_Z_MOVE) * 1000)) ? 4 :
193
+                              !UNEAR_ZERO((SHORT_MANUAL_Z_MOVE) *  100 - int((SHORT_MANUAL_Z_MOVE) *  100)) ? 3 : 2;
194
+    PGM_P const label = GET_TEXT(MSG_MOVE_Z_DIST);
195
+    char tmp[strlen_P(label) + 10 + 1], numstr[10];
196
+    sprintf_P(tmp, label, dtostrf(SHORT_MANUAL_Z_MOVE, 1, digs, numstr));
197
+
198
+    #if DISABLED(HAS_GRAPHICAL_TFT)
199
+      extern const char NUL_STR[];
200
+      SUBMENU_P(NUL_STR, []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
201
+      MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780));
202
+      lcd_put_u8str(tmp);
203
+      MENU_ITEM_ADDON_END();
204
+    #else
205
+      SUBMENU_P(tmp, []{ _goto_manual_move(float(SHORT_MANUAL_Z_MOVE)); });
206
+    #endif
215 207
   }
216 208
   END_MENU();
217 209
 }
218 210
 
211
+#if E_MANUAL
212
+
213
+  inline void _goto_menu_move_distance_e() {
214
+    ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(); }, -1); });
215
+  }
216
+
217
+  inline void _menu_move_distance_e_maybe() {
218
+    #if ENABLED(PREVENT_COLD_EXTRUSION)
219
+      const bool too_cold = thermalManager.tooColdToExtrude(active_extruder);
220
+      if (too_cold) {
221
+        ui.goto_screen([]{
222
+          MenuItem_confirm::select_screen(
223
+            GET_TEXT(MSG_BUTTON_PROCEED), GET_TEXT(MSG_BACK),
224
+            _goto_menu_move_distance_e, ui.goto_previous_screen,
225
+            GET_TEXT(MSG_HOTEND_TOO_COLD), (const char *)nullptr, PSTR("!")
226
+          );
227
+        });
228
+        return;
229
+      }
230
+    #endif
231
+    _goto_menu_move_distance_e();
232
+  }
233
+
234
+#endif // E_MANUAL
235
+
219 236
 void menu_move() {
220 237
   START_MENU();
221 238
   BACK_ITEM(MSG_MOTION);
@@ -278,7 +295,7 @@ void menu_move() {
278 295
   #if E_MANUAL
279 296
 
280 297
     // The current extruder
281
-    SUBMENU(MSG_MOVE_E, []{ _menu_move_distance(E_AXIS, []{ lcd_move_e(); }, -1); });
298
+    SUBMENU(MSG_MOVE_E, []{ _menu_move_distance_e_maybe(); });
282 299
 
283 300
     #define SUBMENU_MOVE_E(N) SUBMENU_N(N, MSG_MOVE_EN, []{ _menu_move_distance(E_AXIS, []{ lcd_move_e(MenuItemBase::itemIndex); }, MenuItemBase::itemIndex); });
284 301
 

+ 1
- 9
buildroot/tests/mega1280-tests Datei anzeigen

@@ -52,16 +52,8 @@ exec_test $1 $2 "RAMPS | DELTA | RRD LCD | DELTA_AUTO_CALIBRATION | DELTA_CALIBR
52 52
 # Delta Config (generic) + ABL bilinear + BLTOUCH
53 53
 use_example_configs delta/generic
54 54
 opt_set LCD_LANGUAGE cz
55
-opt_set X_DRIVER_TYPE L6470
56
-opt_set Y_DRIVER_TYPE L6470
57
-opt_set Z_DRIVER_TYPE L6470
58
-opt_add L6470_CHAIN_SCK_PIN  53
59
-opt_add L6470_CHAIN_MISO_PIN 49
60
-opt_add L6470_CHAIN_MOSI_PIN 40
61
-opt_add L6470_CHAIN_SS_PIN   42
62
-opt_add "ENABLE_RESET_L64XX_CHIPS(V) NOOP"
63 55
 opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR BLTOUCH
64
-exec_test $1 $2 "DELTA | L6470 | RRD LCD | ABL Bilinear | BLTOUCH"
56
+exec_test $1 $2 "DELTA | RRD LCD | ABL Bilinear | BLTOUCH"
65 57
 
66 58
 # clean up
67 59
 restore_configs

+ 13
- 4
buildroot/tests/mega2560-tests Datei anzeigen

@@ -256,13 +256,22 @@ exec_test $1 $2 "Full-featured CR-10S config"
256 256
 #exec_test $1 $2 "Stuff"
257 257
 
258 258
 #
259
-# Delta Config (generic) + UBL + ALLEN_KEY + OLED_PANEL_TINYBOY2 + EEPROM_SETTINGS
259
+# Delta Config (generic) + UBL + ALLEN_KEY + EEPROM_SETTINGS + OLED_PANEL_TINYBOY2
260 260
 #
261 261
 use_example_configs delta/generic
262
+opt_enable RESTORE_LEVELING_AFTER_G28 EEPROM_SETTINGS EEPROM_CHITCHAT \
263
+           Z_PROBE_ALLEN_KEY AUTO_BED_LEVELING_UBL \
264
+           OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY DELTA_CALIBRATION_MENU
262 265
 opt_set LCD_LANGUAGE ko_KR
263
-opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT \
264
-           OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
265
-exec_test $1 $2 "RAMPS | DELTA | OLED_PANEL_TINYBOY2 | UBL | Allen Key | EEPROM"
266
+opt_set X_DRIVER_TYPE L6470
267
+opt_set Y_DRIVER_TYPE L6470
268
+opt_set Z_DRIVER_TYPE L6470
269
+opt_add L6470_CHAIN_SCK_PIN  53
270
+opt_add L6470_CHAIN_MISO_PIN 49
271
+opt_add L6470_CHAIN_MOSI_PIN 40
272
+opt_add L6470_CHAIN_SS_PIN   42
273
+opt_add "ENABLE_RESET_L64XX_CHIPS(V) NOOP"
274
+exec_test $1 $2 "DELTA, RAMPS, L6470, UBL, Allen Key, EEPROM, OLED_PANEL_TINYBOY2..."
266 275
 
267 276
 #
268 277
 # Delta Config (FLSUN AC because it's complex)

Laden…
Abbrechen
Speichern