Переглянути джерело

Patch blocking and manual moves

Scott Lahteine 5 роки тому
джерело
коміт
211ff67440

+ 3
- 3
Marlin/src/feature/bedlevel/bedlevel.cpp Переглянути файл

228
     #ifdef MANUAL_PROBE_START_Z
228
     #ifdef MANUAL_PROBE_START_Z
229
       constexpr float startz = _MAX(0, MANUAL_PROBE_START_Z);
229
       constexpr float startz = _MAX(0, MANUAL_PROBE_START_Z);
230
       #if MANUAL_PROBE_HEIGHT > 0
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
         do_blocking_move_to_z(startz);
232
         do_blocking_move_to_z(startz);
233
       #else
233
       #else
234
-        do_blocking_move_to(pos, startz);
234
+        do_blocking_move_to_xy_z(pos, startz);
235
       #endif
235
       #endif
236
     #elif MANUAL_PROBE_HEIGHT > 0
236
     #elif MANUAL_PROBE_HEIGHT > 0
237
       const float prev_z = current_position.z;
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
       do_blocking_move_to_z(prev_z);
239
       do_blocking_move_to_z(prev_z);
240
     #else
240
     #else
241
       do_blocking_move_to_xy(pos);
241
       do_blocking_move_to_xy(pos);

+ 4
- 4
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Переглянути файл

892
       ui.capture();
892
       ui.capture();
893
 
893
 
894
       save_ubl_active_state_and_disable();  // No bed level correction so only raw data is obtained
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
       ui.return_to_status();
897
       ui.return_to_status();
898
 
898
 
948
       if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
948
       if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
949
 
949
 
950
       restore_ubl_active_state_and_leave();
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
     inline void set_message_with_feedback(PGM_P const msg_P) {
954
     inline void set_message_with_feedback(PGM_P const msg_P) {
986
       LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
986
       LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
987
       ui.capture();                                         // Take over control of the LCD encoder
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
       #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
991
       #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
992
         do_blocking_move_to_z(h_offset);                    // Move Z to the given 'H' offset
992
         do_blocking_move_to_z(h_offset);                    // Move Z to the given 'H' offset
1055
       if (do_ubl_mesh_map) display_map(g29_map_type);
1055
       if (do_ubl_mesh_map) display_map(g29_map_type);
1056
       restore_ubl_active_state_and_leave();
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
       LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH);
1060
       LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH);
1061
       SERIAL_ECHOLNPGM("Done Editing Mesh");
1061
       SERIAL_ECHOLNPGM("Done Editing Mesh");

+ 1
- 1
Marlin/src/lcd/menu/menu_delta_calibrate.cpp Переглянути файл

41
 #endif
41
 #endif
42
 
42
 
43
 void _man_probe_pt(const xy_pos_t &xy) {
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
   ui.synchronize();
45
   ui.synchronize();
46
   move_menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT));
46
   move_menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT));
47
   ui.goto_screen(lcd_move_z);
47
   ui.goto_screen(lcd_move_z);

+ 20
- 1
Marlin/src/module/motion.cpp Переглянути файл

430
 
430
 
431
   planner.synchronize();
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
 void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s/*=0.0*/) {
444
 void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s/*=0.0*/) {
434
   do_blocking_move_to(rx, current_position.y, current_position.z, fr_mm_s);
445
   do_blocking_move_to(rx, current_position.y, current_position.z, fr_mm_s);
435
 }
446
 }
437
   do_blocking_move_to(current_position.x, ry, current_position.z, fr_mm_s);
448
   do_blocking_move_to(current_position.x, ry, current_position.z, fr_mm_s);
438
 }
449
 }
439
 void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s/*=0.0*/) {
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
 void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s/*=0.0*/) {
454
 void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s/*=0.0*/) {
443
   do_blocking_move_to(rx, ry, current_position.z, fr_mm_s);
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
 // Prepare to do endstop or probe moves with custom feedrates.
466
 // Prepare to do endstop or probe moves with custom feedrates.

+ 12
- 22
Marlin/src/module/motion.h Переглянути файл

200
  * Blocking movement and shorthand functions
200
  * Blocking movement and shorthand functions
201
  */
201
  */
202
 void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s=0.0f);
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
 void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f);
207
 void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f);
227
 void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f);
208
 void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f);
228
 void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s=0.0f);
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
 void remember_feedrate_and_scaling();
220
 void remember_feedrate_and_scaling();
231
 void remember_feedrate_scaling_off();
221
 void remember_feedrate_scaling_off();
232
 void restore_feedrate_and_scaling();
222
 void restore_feedrate_and_scaling();

Завантаження…
Відмінити
Зберегти