Skip to content

Commit

Permalink
Fix compilation with LINEAR_AXES 7
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndere1 committed Jun 3, 2021
1 parent 6908d04 commit 638ccdd
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/core/serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PGMSTR(I_LBL, AXIS4_STR ":"); PGMSTR(J_LBL, AXIS5_STR ":"); PGMSTR(K_LBL, AXIS6_
PGMSTR(M_LBL, AXIS7_STR ":"); PGMSTR(O_LBL, AXIS8_STR ":"); PGMSTR(P_LBL, AXIS9_STR ":"); PGMSTR(Q_LBL, AXIS10_STR ":");
PGMSTR(SP_X_STR, " X"); PGMSTR(SP_Y_STR, " Y"); PGMSTR(SP_Z_STR, " Z"); PGMSTR(SP_E_STR, " E");
PGMSTR(SP_I_STR, " " AXIS4_STR); PGMSTR(SP_J_STR, " " AXIS5_STR); PGMSTR(SP_K_STR, " " AXIS6_STR);
PGMSTR(SP_M_STR, " " AXIS7_STR); PGMSTR(SP_O_STR, " " AXIS8_STR); PGMSTR(SP_P_STR, " " AXIS9_STR; PGMSTR(SP_Q_STR, " " AXIS10_STR);
PGMSTR(SP_M_STR, " " AXIS7_STR); PGMSTR(SP_O_STR, " " AXIS8_STR); PGMSTR(SP_P_STR, " " AXIS9_STR); PGMSTR(SP_Q_STR, " " AXIS10_STR);
PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMSTR(SP_E_LBL, " E:");
PGMSTR(SP_A_STR, " A"); PGMSTR(SP_B_STR, " B"); PGMSTR(SP_C_STR, " C");
PGMSTR(SP_I_LBL, " " AXIS4_STR ":"); PGMSTR(SP_J_LBL, " " AXIS5_STR ":"); PGMSTR(SP_K_LBL, " " AXIS6_STR ":");
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void print_pos(
);

inline void print_pos(const xyz_pos_t &xyz, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr) {
print_pos(LINEAR_AXIS_LIST(xyz.x, xyz.y, xyz.z, xyz.i, xyz.j, xyz.k, xyz.o, xyz.o, xyz.p, xyz.q), prefix, suffix);
print_pos(LINEAR_AXIS_LIST(xyz.x, xyz.y, xyz.z, xyz.i, xyz.j, xyz.k, xyz.m, xyz.o, xyz.p, xyz.q), prefix, suffix);
}

#define SERIAL_POS(SUFFIX,VAR) do { print_pos(VAR, PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n")); }while(0)
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ struct XYZval {
FI void set(const XYval<T> pxy, const T pz) { LINEAR_AXIS_CODE(x = pxy.x, y = pxy.y, z = pz, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP); }
FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
#if LINEAR_AXES >= XYZ
FI void set(const T (&arr)[LINEAR_AXES]) { LINEAR_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5]); }
FI void set(LINEAR_AXIS_LIST(const T px, const T py, const T pz, const T pi, const T pj, const T pk)) {
LINEAR_AXIS_CODE(x = px, y = py, z = pz, i = pi, j = pj, k = pk);
FI void set(const T (&arr)[LINEAR_AXES]) { LINEAR_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], m = arr[6], o = arr[7], p = arr[8], q = arr[9]); }
FI void set(LINEAR_AXIS_LIST(const T px, const T py, const T pz, const T pi, const T pj, const T pk, const T pm, const T po, const T pp, const T pq)) {
LINEAR_AXIS_CODE(x = px, y = py, z = pz, i = pi, j = pj, k = pk, m = pm, o = po, p = pp, q = pq);
}
#endif
#if LOGICAL_AXES > LINEAR_AXES
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/core/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class restorer {
// in the range 0-100 while avoiding rounding artifacts
constexpr uint8_t ui8_to_percent(const uint8_t i) { return (int(i) * 100 + 127) / 255; }

const xyze_char_t axis_codes LOGICAL_AXIS_ARRAY('E', 'X', 'Y', 'Z', AXIS4_NAME, AXIS5_NAME, AXIS6_NAME);
const xyze_char_t axis_codes LOGICAL_AXIS_ARRAY('E', 'X', 'Y', 'Z', AXIS4_NAME, AXIS5_NAME, AXIS6_NAME, AXIS7_NAME, AXIS8_NAME, AXIS9_NAME, AXIS10_NAME);

#if LINEAR_AXES <= XYZ
#define AXIS_CHAR(A) ((char)('X' + A))
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/feature/tmc_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,8 @@
const bool print_x/*=true*/, const bool print_y/*=true*/, const bool print_z/*=true*/,
const bool print_i/*=true*/, const bool print_j/*=true*/, const bool print_k/*=true*/, const bool print_m/*=true*/, const bool print_o/*=true*/, const bool print_p/*=true*/, const bool print_q/*=true*/
)) {
#define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM, LOGICAL_AXIS_LIST(print_e, print_x, print_y, print_z, print_i, print_j, print_k)); }while(0)
#define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM, LOGICAL_AXIS_LIST(print_e, print_x, print_y, print_z, print_i, print_j, print_k)); }while(0)
#define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM, LOGICAL_AXIS_LIST(print_e, print_x, print_y, print_z, print_i, print_j, print_k, print_m, print_o, print_p, print_q)); }while(0)
#define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM, LOGICAL_AXIS_LIST(print_e, print_x, print_y, print_z, print_i, print_j, print_k, print_m, print_o, print_p, print_q)); }while(0)

TMC_REPORT("\t", TMC_CODES);
#if HAS_DRIVER(TMC2209)
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/gcode/calibrate/G28.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ void GcodeSuite::G28() {
const bool homeZ = TERN0(HAS_Z_AXIS, parser.seen_test('Z')),
LINEAR_AXIS_LIST( // Other axes should be homed before Z safe-homing
needX = _UNSAFE(X), needY = _UNSAFE(Y), needZ = false, // UNUSED
needI = _UNSAFE(I), needJ = _UNSAFE(J), needK = _UNSAFE(K)
needI = _UNSAFE(I), needJ = _UNSAFE(J), needK = _UNSAFE(K),
needM = _UNSAFE(M), needO = _UNSAFE(O), needP = _UNSAFE(P), needQ = _UNSAFE(Q)
),
LINEAR_AXIS_LIST( // Home each axis if needed or flagged
homeX = needX || parser.seen_test('X'),
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/control/M17_M18_M84.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void GcodeSuite::M18_M84() {
stepper_inactive_time = parser.value_millis_from_seconds();
}
else {
if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) {
if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR, AXIS7_STR, AXIS8_STR, AXIS9_STR, AXIS10_STR))) {
planner.synchronize();
LOGICAL_AXIS_CODE(
if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) disable_e_steppers(),
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/feature/trinamic/M569.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static void set_stealth_status(const bool enable, const int8_t target_extruder)

#if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP \
|| I_HAS_STEALTHCHOP || J_HAS_STEALTHCHOP || K_HAS_STEALTHCHOP \
|| M_HAS_STEALTHCHOP || O_HAS_STEALTHCHOP || P_HAS_STEALTHCHOP || Q_HAS_STEALTHCHOP \
|| M_HAS_STEALTHCHOP || O_HAS_STEALTHCHOP || P_HAS_STEALTHCHOP || Q_HAS_STEALTHCHOP \
|| X2_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP || Z3_HAS_STEALTHCHOP || Z4_HAS_STEALTHCHOP
const uint8_t index = parser.byteval('I');
#endif
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ class GcodeSuite {
axis_relative = rel ? (0 LOGICAL_AXIS_GANG(
| _BV(REL_E),
| _BV(REL_X), | _BV(REL_Y), | _BV(REL_Z),
| _BV(REL_I), | _BV(REL_J), | _BV(REL_K)
| _BV(REL_I), | _BV(REL_J), | _BV(REL_K),
| _BV(REL_M), | _BV(REL_O), | _BV(REL_P), | _BV(REL_Q)
)) : 0;
}
#if HAS_EXTRUDERS
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/gcode/geometry/M206_M428.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ void M206_report() {
SP_I_STR, home_offset.i,
SP_J_STR, home_offset.j,
SP_K_STR, home_offset.k,
SP_M_STR, home_offset.m,
SP_O_STR, home_offset.o,
SP_P_STR, home_offset.p,
SP_Q_STR, home_offset.q
)
);
}
Expand All @@ -60,7 +64,7 @@ void GcodeSuite::M206() {
if (parser.seen('P')) set_home_offset(B_AXIS, parser.value_float()); // Psi
#endif

if (!parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", "I", "J", "K")))
if (!parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", "I", "J", "K", "M", "O", "P", "Q")))
M206_report();
else
report_current_position();
Expand Down
28 changes: 26 additions & 2 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@
#if ENABLED(USE_KMIN_PLUG)
#define ENDSTOPPULLUP_KMIN
#endif
#if ENABLED(USE_MMIN_PLUG)
#if ENABLED(USE_MMIN_PLUG)
#define ENDSTOPPULLUP_MMIN
#endif
#if ENABLED(USE_OMIN_PLUG)
Expand Down Expand Up @@ -2072,7 +2072,7 @@
//

#if HAS_TRINAMIC_CONFIG
#if ANY(STEALTHCHOP_E, STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_I, STEALTHCHOP_J, STEALTHCHOP_K)
#if ANY(STEALTHCHOP_E, STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_I, STEALTHCHOP_J, STEALTHCHOP_K, STEALTHCHOP_M, STEALTHCHOP_O, STEALTHCHOP_P, STEALTHCHOP_Q)
#define STEALTHCHOP_ENABLED 1
#endif
#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
Expand Down Expand Up @@ -2143,6 +2143,18 @@
#if AXIS_HAS_STEALTHCHOP(K)
#define K_HAS_STEALTHCHOP 1
#endif
#if AXIS_HAS_STEALTHCHOP(M)
#define M_HAS_STEALTHCHOP 1
#endif
#if AXIS_HAS_STEALTHCHOP(O)
#define O_HAS_STEALTHCHOP 1
#endif
#if AXIS_HAS_STEALTHCHOP(P)
#define P_HAS_STEALTHCHOP 1
#endif
#if AXIS_HAS_STEALTHCHOP(Q)
#define Q_HAS_STEALTHCHOP 1
#endif
#if E_STEPPERS > 0 && AXIS_HAS_STEALTHCHOP(E0)
#define E0_HAS_STEALTHCHOP 1
#endif
Expand Down Expand Up @@ -2274,6 +2286,18 @@
#ifndef K_SLAVE_ADDRESS
#define K_SLAVE_ADDRESS 0
#endif
#ifndef M_SLAVE_ADDRESS
#define M_SLAVE_ADDRESS 0
#endif
#ifndef O_SLAVE_ADDRESS
#define O_SLAVE_ADDRESS 0
#endif
#ifndef P_SLAVE_ADDRESS
#define P_SLAVE_ADDRESS 0
#endif
#ifndef Q_SLAVE_ADDRESS
#define Q_SLAVE_ADDRESS 0
#endif
#ifndef X2_SLAVE_ADDRESS
#define X2_SLAVE_ADDRESS 0
#endif
Expand Down
28 changes: 22 additions & 6 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#endif

// Strings for sanity check messages
#define _LINEAR_AXES_STR LINEAR_AXIS_GANG("X ", "Y ", "Z ", "I ", "J ", "K ")
#define _LOGICAL_AXES_STR LOGICAL_AXIS_GANG("E ", "X ", "Y ", "Z ", "I ", "J ", "K ")
#define _LINEAR_AXES_STR LINEAR_AXIS_GANG("X ", "Y ", "Z ", "I ", "J ", "K ", "K ", "M ", "O ", "P ", "Q ")
#define _LOGICAL_AXES_STR LOGICAL_AXIS_GANG("E ", "X ", "Y ", "Z ", "I ", "J ", "K ", "M ", "O ", "P ", "Q ")

// Make sure macros aren't borked
#define TEST1
Expand Down Expand Up @@ -1721,7 +1721,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal to 0."),
static_assert(hbm[I_AXIS] >= 0, "HOMING_BUMP_MM.I must be greater than or equal to 0."),
static_assert(hbm[J_AXIS] >= 0, "HOMING_BUMP_MM.J must be greater than or equal to 0."),
static_assert(hbm[K_AXIS] >= 0, "HOMING_BUMP_MM.K must be greater than or equal to 0.")
static_assert(hbm[K_AXIS] >= 0, "HOMING_BUMP_MM.K must be greater than or equal to 0."),
static_assert(hbm[M_AXIS] >= 0, "HOMING_BUMP_MM.M must be greater than or equal to 0."),
static_assert(hbm[O_AXIS] >= 0, "HOMING_BUMP_MM.O must be greater than or equal to 0."),
static_assert(hbm[P_AXIS] >= 0, "HOMING_BUMP_MM.P must be greater than or equal to 0."),
static_assert(hbm[Q_AXIS] >= 0, "HOMING_BUMP_MM.Q must be greater than or equal to 0.")
);
static_assert(COUNT(hbd) == LINEAR_AXES, "HOMING_BUMP_DIVISOR must have " _LINEAR_AXES_STR "elements (and no others).");
LINEAR_AXIS_CODE(
Expand All @@ -1730,7 +1734,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
static_assert(hbd[Z_AXIS] >= 1, "HOMING_BUMP_DIVISOR.Z must be greater than or equal to 1."),
static_assert(hbd[I_AXIS] >= 1, "HOMING_BUMP_DIVISOR.I must be greater than or equal to 1."),
static_assert(hbd[J_AXIS] >= 1, "HOMING_BUMP_DIVISOR.J must be greater than or equal to 1."),
static_assert(hbd[K_AXIS] >= 1, "HOMING_BUMP_DIVISOR.K must be greater than or equal to 1.")
static_assert(hbd[K_AXIS] >= 1, "HOMING_BUMP_DIVISOR.K must be greater than or equal to 1."),
static_assert(hbd[M_AXIS] >= 1, "HOMING_BUMP_DIVISOR.M must be greater than or equal to 1."),
static_assert(hbd[O_AXIS] >= 1, "HOMING_BUMP_DIVISOR.O must be greater than or equal to 1."),
static_assert(hbd[P_AXIS] >= 1, "HOMING_BUMP_DIVISOR.P must be greater than or equal to 1."),
static_assert(hbd[Q_AXIS] >= 1, "HOMING_BUMP_DIVISOR.Q must be greater than or equal to 1.")
);
#endif

Expand All @@ -1743,7 +1751,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
static_assert(hbp[Z_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.Z must be greater than or equal to 0."),
static_assert(hbp[I_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.I must be greater than or equal to 0."),
static_assert(hbp[J_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.J must be greater than or equal to 0."),
static_assert(hbp[K_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.K must be greater than or equal to 0.")
static_assert(hbp[K_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.K must be greater than or equal to 0."),
static_assert(hbp[M_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.M must be greater than or equal to 0."),
static_assert(hbp[O_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.O must be greater than or equal to 0."),
static_assert(hbp[P_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.P must be greater than or equal to 0."),
static_assert(hbp[Q_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.Q must be greater than or equal to 0.")
);
#endif

Expand All @@ -1756,7 +1768,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
static_assert(sbm[Z_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Z must be greater than or equal to 0."),
static_assert(sbm[I_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.I must be greater than or equal to 0."),
static_assert(sbm[J_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.J must be greater than or equal to 0."),
static_assert(sbm[K_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.K must be greater than or equal to 0.")
static_assert(sbm[K_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.K must be greater than or equal to 0."),
static_assert(sbm[M_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.M must be greater than or equal to 0."),
static_assert(sbm[O_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.O must be greater than or equal to 0."),
static_assert(sbm[P_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.P must be greater than or equal to 0."),
static_assert(sbm[Q_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Q must be greater than or equal to 0.")
);
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/menu/menu_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void menu_backlash();
#elif ENABLED(LIMITED_MAX_FR_EDITING)
DEFAULT_MAX_FEEDRATE
#else
LOGICAL_AXIS_ARRAY(9999, 9999, 9999, 9999, 9999, 9999, 9999)
LOGICAL_AXIS_ARRAY(9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999, 9999)
#endif
;
#if ENABLED(LIMITED_MAX_FR_EDITING) && !defined(MAX_FEEDRATE_EDIT_VALUES)
Expand Down
42 changes: 29 additions & 13 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,22 +626,23 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
void do_blocking_move_to_i(const_float_t ri, const_feedRate_t fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyz_i(current_position, ri, fr_mm_s);
}
#endif
#if LINEAR_AXES == 4
void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, i, fr_mm_s);
do_blocking_move_to(
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, i, raw.j, raw.k, \
raw.m, raw.o, raw.p, raw.q),
fr_mm_s);
}
#endif

#if LINEAR_AXES >= 5
void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, i, raw.j, fr_mm_s); // TODO (DerAndere): Test if this really works for LINEAR_AXES > 5
}
void do_blocking_move_to_j(const_float_t rj, const_feedRate_t fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyzi_j(current_position, rj, fr_mm_s);
}
void do_blocking_move_to_xyzi_j(const xyze_pos_t &raw, const_float_t j, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, j, fr_mm_s);
do_blocking_move_to(
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, j, raw.k, \
raw.m, raw.o, raw.p, raw.q),
fr_mm_s);
}
#endif

Expand All @@ -650,16 +651,22 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyzij_k(current_position, rk, fr_mm_s);
}
void do_blocking_move_to_xyzij_k(const xyze_pos_t &raw, const_float_t k, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, raw.j, k, fr_mm_s);
do_blocking_move_to(
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, raw.j, k, \
raw.m, raw.o, raw.p, raw.q),
fr_mm_s);
}
#endif

#if LINEAR_AXES >= 7
void do_blocking_move_to_m(const_float_t rm, const_feedRate_t fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyzijk_m(current_position, rm, fr_mm_s);
}
void do_blocking_move_to_xyzijk_m(const xyze_pos_t &raw, const_float_t m, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, m, fr_mm_s);
void do_blocking_move_to_xyzijkm_o(const xyze_pos_t &raw, const_float_t o, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, \
m, raw.o, raw.p, raw.q),
fr_mm_s);
}
#endif

Expand All @@ -668,7 +675,10 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyzijkm_o(current_position, ro, fr_mm_s);
}
void do_blocking_move_to_xyzijkm_o(const xyze_pos_t &raw, const_float_t o, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, raw.m, o, fr_mm_s);
do_blocking_move_to(
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, \
raw.m, o, raw.p, raw.q),
fr_mm_s);
}
#endif

Expand All @@ -677,7 +687,10 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyzijkm_p(current_position, rp, fr_mm_s);
}
void do_blocking_move_to_xyzijkm_p(const xyze_pos_t &raw, const_float_t p, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, raw.m, raw.o, p, fr_mm_s);
do_blocking_move_to(
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, \
raw.m, raw.o, p, raw.q),
fr_mm_s);
}
#endif

Expand All @@ -686,7 +699,10 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
do_blocking_move_to_xyzijkmp_q(current_position, rq, fr_mm_s);
}
void do_blocking_move_to_xyzijkmp_q(const xyze_pos_t &raw, const_float_t q, const_feedRate_t fr_mm_s/*=0.0f*/) {
do_blocking_move_to(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, raw.m, raw.o, raw.p, q, fr_mm_s);
do_blocking_move_to(
LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, raw.j, raw.k, \
raw.m, raw.o, raw.p, q),
fr_mm_s);
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ void Planner::check_axes_activity() {
float high = 0.0;
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
block_t *block = &block_buffer[b];
if (LINEAR_AXIS_GANG(block->steps.x, || block->steps.y, || block->steps.z, block->steps.i, || block->steps.j, || block->steps.k, block->steps.m, || block->steps.o, || block->steps.p, || block->steps.q)) {
if (LINEAR_AXIS_GANG(block->steps.x, || block->steps.y, || block->steps.z, || block->steps.i, || block->steps.j, || block->steps.k, || block->steps.m, || block->steps.o, || block->steps.p, || block->steps.q)) {
const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec;
NOLESS(high, se);
}
Expand Down Expand Up @@ -2078,7 +2078,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
LINEAR_AXIS_GANG(
sq(steps_dist_mm.x) + sq(steps_dist_mm.head.y) + sq(steps_dist_mm.head.z)
+ sq(steps_dist_mm.i), + sq(steps_dist_mm.j), + sq(steps_dist_mm.k),
+ sq(steps_dist_mm.m), + sq(steps_dist_mm.o), + sq(steps_dist_mm.p), + sq(steps_dist_mm.q)
+ sq(steps_dist_mm.m), + sq(steps_dist_mm.o), + sq(steps_dist_mm.p), + sq(steps_dist_mm.q)
)
#elif ENABLED(FOAMCUTTER_XYUV)
// Return the largest distance move from either X/Y or I/J plane
Expand Down
Loading

0 comments on commit 638ccdd

Please sign in to comment.