Explorar el Código

Use do_blocking_move_to(ref, fr)

Scott Lahteine hace 6 años
padre
commit
ce40c2e87c

+ 3
- 3
Marlin/src/gcode/calibrate/G425.cpp Ver fichero

111
   destination[Z_AXIS] = MAX(MIN(destination[Z_AXIS], Z_MAX_POS), Z_MIN_POS);
111
   destination[Z_AXIS] = MAX(MIN(destination[Z_AXIS], Z_MAX_POS), Z_MIN_POS);
112
 
112
 
113
   // Move to position
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
   set_destination_from_current();
182
   set_destination_from_current();
183
   for (float travel = 0; travel < limit; travel += step) {
183
   for (float travel = 0; travel < limit; travel += step) {
184
     destination[axis] += dir * step;
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
     planner.synchronize();
186
     planner.synchronize();
187
     if (read_calibration_pin() == stop_state)
187
     if (read_calibration_pin() == stop_state)
188
       break;
188
       break;
214
   }
214
   }
215
   // Return to starting position
215
   // Return to starting position
216
   destination[axis] = start_pos;
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
   return measured_pos;
218
   return measured_pos;
219
 }
219
 }
220
 
220
 

+ 2
- 2
Marlin/src/module/motion.h Ver fichero

170
 void do_blocking_move_to_z(const float &rz, const float &fr_mm_s=0);
170
 void do_blocking_move_to_z(const float &rz, const float &fr_mm_s=0);
171
 void do_blocking_move_to_xy(const float &rx, const float &ry, const float &fr_mm_s=0);
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
   do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
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
   do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
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 Ver fichero

868
         #endif
868
         #endif
869
 
869
 
870
         // Move back to the original (or tweaked) position
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
         #if ENABLED(DUAL_X_CARRIAGE)
872
         #if ENABLED(DUAL_X_CARRIAGE)
873
           active_extruder_parked = false;
873
           active_extruder_parked = false;
874
         #endif
874
         #endif

Loading…
Cancelar
Guardar