浏览代码

Use do_blocking_move_to(ref, fr)

Scott Lahteine 6 年前
父节点
当前提交
ce40c2e87c
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 3
    3
      Marlin/src/gcode/calibrate/G425.cpp
  2. 2
    2
      Marlin/src/module/motion.h
  3. 1
    1
      Marlin/src/module/tool_change.cpp

+ 3
- 3
Marlin/src/gcode/calibrate/G425.cpp 查看文件

@@ -111,7 +111,7 @@ inline void move_to(
111 111
   destination[Z_AXIS] = MAX(MIN(destination[Z_AXIS], Z_MAX_POS), Z_MIN_POS);
112 112
 
113 113
   // Move to position
114
-  do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL));
114
+  do_blocking_move_to(destination, MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL));
115 115
 }
116 116
 
117 117
 /**
@@ -182,7 +182,7 @@ float measuring_movement(const AxisEnum axis, const int dir, const bool stop_sta
182 182
   set_destination_from_current();
183 183
   for (float travel = 0; travel < limit; travel += step) {
184 184
     destination[axis] += dir * step;
185
-    do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], mms);
185
+    do_blocking_move_to(destination, mms);
186 186
     planner.synchronize();
187 187
     if (read_calibration_pin() == stop_state)
188 188
       break;
@@ -214,7 +214,7 @@ inline float measure(const AxisEnum axis, const int dir, const bool stop_state,
214 214
   }
215 215
   // Return to starting position
216 216
   destination[axis] = start_pos;
217
-  do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL));
217
+  do_blocking_move_to(destination, MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL));
218 218
   return measured_pos;
219 219
 }
220 220
 

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

@@ -170,11 +170,11 @@ void do_blocking_move_to_x(const float &rx, const float &fr_mm_s=0);
170 170
 void do_blocking_move_to_z(const float &rz, const float &fr_mm_s=0);
171 171
 void do_blocking_move_to_xy(const float &rx, const float &ry, const float &fr_mm_s=0);
172 172
 
173
-FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZ], const float &fr_mm_s) {
173
+FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZ], const float &fr_mm_s=0) {
174 174
   do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
175 175
 }
176 176
 
177
-FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZE], const float &fr_mm_s) {
177
+FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZE], const float &fr_mm_s=0) {
178 178
   do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
179 179
 }
180 180
 

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

@@ -868,7 +868,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
868 868
         #endif
869 869
 
870 870
         // Move back to the original (or tweaked) position
871
-        do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
871
+        do_blocking_move_to(destination);
872 872
         #if ENABLED(DUAL_X_CARRIAGE)
873 873
           active_extruder_parked = false;
874 874
         #endif

正在加载...
取消
保存