浏览代码

Patch blocking and manual moves

Scott Lahteine 5 年前
父节点
当前提交
211ff67440

+ 3
- 3
Marlin/src/feature/bedlevel/bedlevel.cpp 查看文件

@@ -228,14 +228,14 @@ void reset_bed_level() {
228 228
     #ifdef MANUAL_PROBE_START_Z
229 229
       constexpr float startz = _MAX(0, MANUAL_PROBE_START_Z);
230 230
       #if MANUAL_PROBE_HEIGHT > 0
231
-        do_blocking_move_to(pos, MANUAL_PROBE_HEIGHT);
231
+        do_blocking_move_to_xy_z(pos, MANUAL_PROBE_HEIGHT);
232 232
         do_blocking_move_to_z(startz);
233 233
       #else
234
-        do_blocking_move_to(pos, startz);
234
+        do_blocking_move_to_xy_z(pos, startz);
235 235
       #endif
236 236
     #elif MANUAL_PROBE_HEIGHT > 0
237 237
       const float prev_z = current_position.z;
238
-      do_blocking_move_to(pos, MANUAL_PROBE_HEIGHT);
238
+      do_blocking_move_to_xy_z(pos, MANUAL_PROBE_HEIGHT);
239 239
       do_blocking_move_to_z(prev_z);
240 240
     #else
241 241
       do_blocking_move_to_xy(pos);

+ 4
- 4
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp 查看文件

@@ -892,7 +892,7 @@
892 892
       ui.capture();
893 893
 
894 894
       save_ubl_active_state_and_disable();  // No bed level correction so only raw data is obtained
895
-      do_blocking_move_to(current_position.x, current_position.y, z_clearance);
895
+      do_blocking_move_to_xy_z(current_position, z_clearance);
896 896
 
897 897
       ui.return_to_status();
898 898
 
@@ -948,7 +948,7 @@
948 948
       if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
949 949
 
950 950
       restore_ubl_active_state_and_leave();
951
-      do_blocking_move_to(pos, Z_CLEARANCE_DEPLOY_PROBE);
951
+      do_blocking_move_to_xy_z(pos, Z_CLEARANCE_DEPLOY_PROBE);
952 952
     }
953 953
 
954 954
     inline void set_message_with_feedback(PGM_P const msg_P) {
@@ -986,7 +986,7 @@
986 986
       LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
987 987
       ui.capture();                                         // Take over control of the LCD encoder
988 988
 
989
-      do_blocking_move_to(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
989
+      do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance
990 990
 
991 991
       #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
992 992
         do_blocking_move_to_z(h_offset);                    // Move Z to the given 'H' offset
@@ -1055,7 +1055,7 @@
1055 1055
       if (do_ubl_mesh_map) display_map(g29_map_type);
1056 1056
       restore_ubl_active_state_and_leave();
1057 1057
 
1058
-      do_blocking_move_to(pos, Z_CLEARANCE_BETWEEN_PROBES);
1058
+      do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES);
1059 1059
 
1060 1060
       LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH);
1061 1061
       SERIAL_ECHOLNPGM("Done Editing Mesh");

+ 1
- 1
Marlin/src/lcd/menu/menu_delta_calibrate.cpp 查看文件

@@ -41,7 +41,7 @@
41 41
 #endif
42 42
 
43 43
 void _man_probe_pt(const xy_pos_t &xy) {
44
-  do_blocking_move_to(xy, Z_CLEARANCE_BETWEEN_PROBES);
44
+  do_blocking_move_to_xy_z(xy, Z_CLEARANCE_BETWEEN_PROBES);
45 45
   ui.synchronize();
46 46
   move_menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT));
47 47
   ui.goto_screen(lcd_move_z);

+ 20
- 1
Marlin/src/module/motion.cpp 查看文件

@@ -430,6 +430,17 @@ void do_blocking_move_to(const float rx, const float ry, const float rz, const f
430 430
 
431 431
   planner.synchronize();
432 432
 }
433
+
434
+void do_blocking_move_to(const xy_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) {
435
+  do_blocking_move_to(raw.x, raw.y, current_position.z, fr_mm_s);
436
+}
437
+void do_blocking_move_to(const xyz_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) {
438
+  do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s);
439
+}
440
+void do_blocking_move_to(const xyze_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) {
441
+  do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s);
442
+}
443
+
433 444
 void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s/*=0.0*/) {
434 445
   do_blocking_move_to(rx, current_position.y, current_position.z, fr_mm_s);
435 446
 }
@@ -437,11 +448,19 @@ void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s/*=0.0*/) {
437 448
   do_blocking_move_to(current_position.x, ry, current_position.z, fr_mm_s);
438 449
 }
439 450
 void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s/*=0.0*/) {
440
-  do_blocking_move_to(current_position.x, current_position.y, rz, fr_mm_s);
451
+  do_blocking_move_to_xy_z(current_position, rz, fr_mm_s);
441 452
 }
453
+
442 454
 void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s/*=0.0*/) {
443 455
   do_blocking_move_to(rx, ry, current_position.z, fr_mm_s);
444 456
 }
457
+void do_blocking_move_to_xy(const xy_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) {
458
+  do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s);
459
+}
460
+
461
+void do_blocking_move_to_xy_z(const xy_pos_t &raw, const float &z, const feedRate_t &fr_mm_s/*=0.0f*/) {
462
+  do_blocking_move_to(raw.x, raw.y, z, fr_mm_s);
463
+}
445 464
 
446 465
 //
447 466
 // Prepare to do endstop or probe moves with custom feedrates.

+ 12
- 22
Marlin/src/module/motion.h 查看文件

@@ -200,33 +200,23 @@ inline void prepare_internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f)
200 200
  * Blocking movement and shorthand functions
201 201
  */
202 202
 void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s=0.0f);
203
-
204
-FORCE_INLINE void do_blocking_move_to(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
205
-  do_blocking_move_to(raw.x, raw.y, current_position.z, fr_mm_s);
206
-}
207
-FORCE_INLINE void do_blocking_move_to(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
208
-  do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s);
209
-}
210
-FORCE_INLINE void do_blocking_move_to(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
211
-  do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s);
212
-}
213
-
214
-void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s=0.0f);
215
-
216
-FORCE_INLINE void do_blocking_move_to_xy(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
217
-  do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s);
218
-}
219
-FORCE_INLINE void do_blocking_move_to_xy(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
220
-  do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s);
221
-}
222
-FORCE_INLINE void do_blocking_move_to_xy(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) {
223
-  do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s);
224
-}
203
+void do_blocking_move_to(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f);
204
+void do_blocking_move_to(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f);
205
+void do_blocking_move_to(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f);
225 206
 
226 207
 void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f);
227 208
 void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f);
228 209
 void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s=0.0f);
229 210
 
211
+void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s=0.0f);
212
+void do_blocking_move_to_xy(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f);
213
+FORCE_INLINE void do_blocking_move_to_xy(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f)  { do_blocking_move_to_xy(xy_pos_t(raw), fr_mm_s); }
214
+FORCE_INLINE void do_blocking_move_to_xy(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to_xy(xy_pos_t(raw), fr_mm_s); }
215
+
216
+void do_blocking_move_to_xy_z(const xy_pos_t &raw, const float &z, const feedRate_t &fr_mm_s=0.0f);
217
+FORCE_INLINE void do_blocking_move_to_xy_z(const xyz_pos_t &raw, const float &z, const feedRate_t &fr_mm_s=0.0f)  { do_blocking_move_to_xy_z(xy_pos_t(raw), z, fr_mm_s); }
218
+FORCE_INLINE void do_blocking_move_to_xy_z(const xyze_pos_t &raw, const float &z, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to_xy_z(xy_pos_t(raw), z, fr_mm_s); }
219
+
230 220
 void remember_feedrate_and_scaling();
231 221
 void remember_feedrate_scaling_off();
232 222
 void restore_feedrate_and_scaling();

正在加载...
取消
保存