|
@@ -733,11 +733,11 @@ void get_cartesian_from_steppers();
|
733
|
733
|
void set_current_from_steppers_for_axis(const AxisEnum axis);
|
734
|
734
|
|
735
|
735
|
#if ENABLED(ARC_SUPPORT)
|
736
|
|
- void plan_arc(float target[XYZE], float* offset, uint8_t clockwise);
|
|
736
|
+ void plan_arc(const float (&cart)[XYZE], const float (&offset)[2], const bool clockwise);
|
737
|
737
|
#endif
|
738
|
738
|
|
739
|
739
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
740
|
|
- void plan_cubic_move(const float offset[4]);
|
|
740
|
+ void plan_cubic_move(const float (&offset)[4]);
|
741
|
741
|
#endif
|
742
|
742
|
|
743
|
743
|
void tool_change(const uint8_t tmp_extruder, const float fr_mm_s=0.0, bool no_move=false);
|
|
@@ -1808,7 +1808,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
1808
|
1808
|
|
1809
|
1809
|
#elif ENABLED(Z_PROBE_ALLEN_KEY)
|
1810
|
1810
|
|
1811
|
|
- FORCE_INLINE void do_blocking_move_to(const float raw[XYZ], const float &fr_mm_s) {
|
|
1811
|
+ FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZ], const float &fr_mm_s) {
|
1812
|
1812
|
do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
|
1813
|
1813
|
}
|
1814
|
1814
|
|
|
@@ -8326,7 +8326,7 @@ void report_current_position() {
|
8326
|
8326
|
|
8327
|
8327
|
#ifdef M114_DETAIL
|
8328
|
8328
|
|
8329
|
|
- void report_xyze(const float pos[XYZE], const uint8_t n = 4, const uint8_t precision = 3) {
|
|
8329
|
+ void report_xyze(const float pos[], const uint8_t n = 4, const uint8_t precision = 3) {
|
8330
|
8330
|
char str[12];
|
8331
|
8331
|
for (uint8_t i = 0; i < n; i++) {
|
8332
|
8332
|
SERIAL_CHAR(' ');
|
|
@@ -8337,7 +8337,7 @@ void report_current_position() {
|
8337
|
8337
|
SERIAL_EOL();
|
8338
|
8338
|
}
|
8339
|
8339
|
|
8340
|
|
- inline void report_xyz(const float pos[XYZ]) { report_xyze(pos, 3); }
|
|
8340
|
+ inline void report_xyz(const float pos[]) { report_xyze(pos, 3); }
|
8341
|
8341
|
|
8342
|
8342
|
void report_current_position_detail() {
|
8343
|
8343
|
|
|
@@ -12659,7 +12659,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
12659
|
12659
|
* For Unified Bed Leveling (Delta or Segmented Cartesian)
|
12660
|
12660
|
* the ubl.prepare_segmented_line_to method replaces this.
|
12661
|
12661
|
*/
|
12662
|
|
- inline bool prepare_kinematic_move_to(float rtarget[XYZE]) {
|
|
12662
|
+ inline bool prepare_kinematic_move_to(const float (&rtarget)[XYZE]) {
|
12663
|
12663
|
|
12664
|
12664
|
// Get the top feedrate of the move in the XY plane
|
12665
|
12665
|
const float _feedrate_mm_s = MMS_SCALED(feedrate_mm_s);
|
|
@@ -12968,9 +12968,9 @@ void prepare_move_to_destination() {
|
12968
|
12968
|
* options for G2/G3 arc generation. In future these options may be GCode tunable.
|
12969
|
12969
|
*/
|
12970
|
12970
|
void plan_arc(
|
12971
|
|
- float raw[XYZE], // Destination position
|
12972
|
|
- float *offset, // Center of rotation relative to current_position
|
12973
|
|
- uint8_t clockwise // Clockwise?
|
|
12971
|
+ const float (&cart)[XYZE], // Destination position
|
|
12972
|
+ const float (&offset)[2], // Center of rotation relative to current_position
|
|
12973
|
+ const bool clockwise // Clockwise?
|
12974
|
12974
|
) {
|
12975
|
12975
|
#if ENABLED(CNC_WORKSPACE_PLANES)
|
12976
|
12976
|
AxisEnum p_axis, q_axis, l_axis;
|
|
@@ -12990,10 +12990,10 @@ void prepare_move_to_destination() {
|
12990
|
12990
|
const float radius = HYPOT(r_P, r_Q),
|
12991
|
12991
|
center_P = current_position[p_axis] - r_P,
|
12992
|
12992
|
center_Q = current_position[q_axis] - r_Q,
|
12993
|
|
- rt_X = raw[p_axis] - center_P,
|
12994
|
|
- rt_Y = raw[q_axis] - center_Q,
|
12995
|
|
- linear_travel = raw[l_axis] - current_position[l_axis],
|
12996
|
|
- extruder_travel = raw[E_AXIS] - current_position[E_AXIS];
|
|
12993
|
+ rt_X = cart[p_axis] - center_P,
|
|
12994
|
+ rt_Y = cart[q_axis] - center_Q,
|
|
12995
|
+ linear_travel = cart[l_axis] - current_position[l_axis],
|
|
12996
|
+ extruder_travel = cart[E_AXIS] - current_position[E_AXIS];
|
12997
|
12997
|
|
12998
|
12998
|
// CCW angle of rotation between position and target from the circle center. Only one atan2() trig computation required.
|
12999
|
12999
|
float angular_travel = ATAN2(r_P * rt_Y - r_Q * rt_X, r_P * rt_X + r_Q * rt_Y);
|
|
@@ -13001,7 +13001,7 @@ void prepare_move_to_destination() {
|
13001
|
13001
|
if (clockwise) angular_travel -= RADIANS(360);
|
13002
|
13002
|
|
13003
|
13003
|
// Make a circle if the angular rotation is 0 and the target is current position
|
13004
|
|
- if (angular_travel == 0 && current_position[p_axis] == raw[p_axis] && current_position[q_axis] == raw[q_axis])
|
|
13004
|
+ if (angular_travel == 0 && current_position[p_axis] == cart[p_axis] && current_position[q_axis] == cart[q_axis])
|
13005
|
13005
|
angular_travel = RADIANS(360);
|
13006
|
13006
|
|
13007
|
13007
|
const float mm_of_travel = HYPOT(angular_travel * radius, FABS(linear_travel));
|
|
@@ -13101,7 +13101,7 @@ void prepare_move_to_destination() {
|
13101
|
13101
|
}
|
13102
|
13102
|
|
13103
|
13103
|
// Ensure last segment arrives at target location.
|
13104
|
|
- planner.buffer_line_kinematic(raw, fr_mm_s, active_extruder);
|
|
13104
|
+ planner.buffer_line_kinematic(cart, fr_mm_s, active_extruder);
|
13105
|
13105
|
|
13106
|
13106
|
// As far as the parser is concerned, the position is now == target. In reality the
|
13107
|
13107
|
// motion control system might still be processing the action and the real tool position
|
|
@@ -13113,7 +13113,7 @@ void prepare_move_to_destination() {
|
13113
|
13113
|
|
13114
|
13114
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
13115
|
13115
|
|
13116
|
|
- void plan_cubic_move(const float offset[4]) {
|
|
13116
|
+ void plan_cubic_move(const float (&offset)[4]) {
|
13117
|
13117
|
cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder);
|
13118
|
13118
|
|
13119
|
13119
|
// As far as the parser is concerned, the position is now == destination. In reality the
|