Skip to content

Commit

Permalink
✨ Support for up to 9 axes (MarlinFirmware#23112, MarlinFirmware#24036,
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndere1 authored and Frank Roth committed Jun 7, 2022
1 parent dfc8acf commit e3034a7
Show file tree
Hide file tree
Showing 30 changed files with 622 additions and 0 deletions.
80 changes: 80 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,18 @@
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"

/**
<<<<<<< HEAD
* Stepper Drivers
=======
* Define the number of coordinated axes.
* See https://github.com/DerAndere1/Marlin/wiki
* Each axis gets its own stepper control and endstop:
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
*
* These settings allow Marlin to tune stepper driver timing and enable advanced options for
* stepper drivers that support them. You may also override timing options in Configuration_adv.h.
*
<<<<<<< HEAD
* Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
*
* Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
Expand Down Expand Up @@ -187,6 +194,11 @@
//#define E5_DRIVER_TYPE A4988
//#define E6_DRIVER_TYPE A4988
//#define E7_DRIVER_TYPE A4988
=======
* :[3, 4, 5, 6, 7, 8, 9]
*/
//#define NUM_AXES 3
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))

/**
* Additional Axis Settings
Expand All @@ -205,6 +217,7 @@
*
* Regardless of these settings the axes are internally named I, J, K, U, V, W.
*/
<<<<<<< HEAD
#ifdef I_DRIVER_TYPE
#define AXIS4_NAME 'A' // :['A', 'B', 'C', 'U', 'V', 'W']
#define AXIS4_ROTATES
Expand All @@ -226,6 +239,29 @@
//#define AXIS8_ROTATES
#endif
#ifdef W_DRIVER_TYPE
=======
#if NUM_AXES >= 4
#define AXIS4_NAME 'A' // :['A', 'B', 'C', 'U', 'V', 'W']
#define AXIS4_ROTATES
#endif
#if NUM_AXES >= 5
#define AXIS5_NAME 'B' // :['B', 'C', 'U', 'V', 'W']
#define AXIS5_ROTATES
#endif
#if NUM_AXES >= 6
#define AXIS6_NAME 'C' // :['C', 'U', 'V', 'W']
#define AXIS6_ROTATES
#endif
#if NUM_AXES >= 7
#define AXIS7_NAME 'U' // :['U', 'V', 'W']
//#define AXIS7_ROTATES
#endif
#if NUM_AXES >= 8
#define AXIS8_NAME 'V' // :['V', 'W']
//#define AXIS8_ROTATES
#endif
#if NUM_AXES >= 9
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
#define AXIS9_NAME 'W' // :['W']
//#define AXIS9_ROTATES
#endif
Expand Down Expand Up @@ -964,6 +1000,50 @@
#define W_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.

<<<<<<< HEAD
=======
/**
* Stepper Drivers
*
* These settings allow Marlin to tune stepper driver timing and enable advanced options for
* stepper drivers that support them. You may also override timing options in Configuration_adv.h.
*
* A4988 is assumed for unspecified drivers.
*
* Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
*
* Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
* TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/
#define X_DRIVER_TYPE A4988
#define Y_DRIVER_TYPE A4988
#define Z_DRIVER_TYPE A4988
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
//#define I_DRIVER_TYPE A4988
//#define J_DRIVER_TYPE A4988
//#define K_DRIVER_TYPE A4988
//#define U_DRIVER_TYPE A4988
//#define V_DRIVER_TYPE A4988
//#define W_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE A4988
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
//#define E5_DRIVER_TYPE A4988
//#define E6_DRIVER_TYPE A4988
//#define E7_DRIVER_TYPE A4988

>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE
Expand Down
4 changes: 4 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,11 @@

/**
* Extra G-code to run while executing tool-change commands. Can be used to use an additional
<<<<<<< HEAD
* stepper motor (e.g., I axis in Configuration.h) to drive the tool-changer.
=======
* stepper motor (I axis, see option NUM_AXES in Configuration.h) to drive the tool-changer.
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
*/
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
Expand Down
17 changes: 17 additions & 0 deletions Marlin/src/core/serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
uint8_t marlin_debug_flags = MARLIN_DEBUG_NONE;

// Commonly-used strings in serial output
<<<<<<< HEAD
PGMSTR(SP_A_STR, " A"); PGMSTR(SP_B_STR, " B"); PGMSTR(SP_C_STR, " C");
PGMSTR(SP_P_STR, " P"); PGMSTR(SP_T_STR, " T"); PGMSTR(NUL_STR, "");

Expand All @@ -39,6 +40,22 @@ PGMSTR(SP_P_STR, " P"); PGMSTR(SP_T_STR, " T"); PGMSTR(NUL_STR, "");
#define _SP_N_LBL(N) PGMSTR(SP_##N##_LBL, " " STR_##N ":");
MAP(_N_STR, LOGICAL_AXIS_NAMES); MAP(_SP_N_STR, LOGICAL_AXIS_NAMES);
MAP(_N_LBL, LOGICAL_AXIS_NAMES); MAP(_SP_N_LBL, LOGICAL_AXIS_NAMES);
=======
PGMSTR(NUL_STR, ""); PGMSTR(SP_P_STR, " P"); PGMSTR(SP_T_STR, " T");
PGMSTR(X_STR, "X"); PGMSTR(Y_STR, "Y"); PGMSTR(Z_STR, "Z"); PGMSTR(E_STR, "E");
PGMSTR(U_STR, STR_U); PGMSTR(V_STR, STR_V); PGMSTR(W_STR, STR_W);
PGMSTR(X_LBL, "X:"); PGMSTR(Y_LBL, "Y:"); PGMSTR(Z_LBL, "Z:"); PGMSTR(E_LBL, "E:");
PGMSTR(U_LBL, STR_U ":"); PGMSTR(V_LBL, STR_V ":"); PGMSTR(W_LBL, STR_W ":");
PGMSTR(SP_A_STR, " A"); PGMSTR(SP_B_STR, " B"); PGMSTR(SP_C_STR, " C");
PGMSTR(SP_X_STR, " X"); PGMSTR(SP_Y_STR, " Y"); PGMSTR(SP_Z_STR, " Z"); PGMSTR(SP_E_STR, " E");
PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMSTR(SP_E_LBL, " E:");
PGMSTR(I_STR, STR_I); PGMSTR(J_STR, STR_J); PGMSTR(K_STR, STR_K);
PGMSTR(I_LBL, STR_I ":"); PGMSTR(J_LBL, STR_J ":"); PGMSTR(K_LBL, STR_K ":");
PGMSTR(SP_I_STR, " " STR_I); PGMSTR(SP_J_STR, " " STR_J); PGMSTR(SP_K_STR, " " STR_K);
PGMSTR(SP_U_STR, " " STR_U); PGMSTR(SP_V_STR, " " STR_V); PGMSTR(SP_W_STR, " " STR_W);
PGMSTR(SP_I_LBL, " " STR_I ":"); PGMSTR(SP_J_LBL, " " STR_J ":"); PGMSTR(SP_K_LBL, " " STR_K ":");
PGMSTR(SP_U_LBL, " " STR_U ":"); PGMSTR(SP_V_LBL, " " STR_V ":"); PGMSTR(SP_W_LBL, " " STR_W ":");
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))

// Hook Meatpack if it's enabled on the first leaf
#if ENABLED(MEATPACK_ON_SERIAL_PORT_1)
Expand Down
11 changes: 11 additions & 0 deletions Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@
#include "../feature/meatpack.h"
#endif

<<<<<<< HEAD
=======
// Commonly-used strings in serial output
extern const char NUL_STR[], SP_P_STR[], SP_T_STR[],
SP_A_STR[], SP_B_STR[], SP_C_STR[],
SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_I_STR[], SP_J_STR[], SP_K_STR[], SP_U_STR[], SP_V_STR[], SP_W_STR[], SP_E_STR[],
SP_X_LBL[], SP_Y_LBL[], SP_Z_LBL[], SP_I_LBL[], SP_J_LBL[], SP_K_LBL[], SP_U_LBL[], SP_V_LBL[], SP_W_LBL[], SP_E_LBL[],
X_STR[], Y_STR[], Z_STR[], I_STR[], J_STR[], K_STR[], U_STR[], V_STR[], W_STR[], E_STR[],
X_LBL[], Y_LBL[], Z_LBL[], I_LBL[], J_LBL[], K_LBL[], U_LBL[], V_LBL[], W_LBL[], E_LBL[];

>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
//
// Debugging flags for use by M111
//
Expand Down
18 changes: 18 additions & 0 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct IF<true, L, R> { typedef L type; };
#define NUM_AXIS_GANG(V...) GANG_N(NUM_AXES, V)
#define NUM_AXIS_CODE(V...) CODE_N(NUM_AXES, V)
#define NUM_AXIS_LIST(V...) LIST_N(NUM_AXES, V)
<<<<<<< HEAD
#define NUM_AXIS_LIST_1(V) LIST_N_1(NUM_AXES, V)
#define NUM_AXIS_ARRAY(V...) { NUM_AXIS_LIST(V) }
#define NUM_AXIS_ARRAY_1(V) { NUM_AXIS_LIST_1(V) }
Expand All @@ -48,10 +49,17 @@ struct IF<true, L, R> { typedef L type; };
#define MAIN_AXIS_NAMES NUM_AXIS_LIST(X, Y, Z, I, J, K, U, V, W)
#define MAIN_AXIS_MAP(F) MAP(F, MAIN_AXIS_NAMES)
#define STR_AXES_MAIN NUM_AXIS_GANG("X", "Y", "Z", STR_I, STR_J, STR_K, STR_U, STR_V, STR_W)
=======
#define NUM_AXIS_ARRAY(V...) { NUM_AXIS_LIST(V) }
#define NUM_AXIS_ARGS(T...) NUM_AXIS_LIST(T x, T y, T z, T i, T j, T k, T u, T v, T w)
#define NUM_AXIS_ELEM(O) NUM_AXIS_LIST(O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
#define NUM_AXIS_DEFS(T,V) NUM_AXIS_LIST(T x=V, T y=V, T z=V, T i=V, T j=V, T k=V, T u=V, T v=V, T w=V)
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))

#define LOGICAL_AXIS_GANG(E,V...) NUM_AXIS_GANG(V) GANG_ITEM_E(E)
#define LOGICAL_AXIS_CODE(E,V...) NUM_AXIS_CODE(V) CODE_ITEM_E(E)
#define LOGICAL_AXIS_LIST(E,V...) NUM_AXIS_LIST(V) LIST_ITEM_E(E)
<<<<<<< HEAD
#define LOGICAL_AXIS_LIST_1(V) NUM_AXIS_LIST_1(V) LIST_ITEM_E(V)
#define LOGICAL_AXIS_ARRAY(E,V...) { LOGICAL_AXIS_LIST(E,V) }
#define LOGICAL_AXIS_ARRAY_1(V) { LOGICAL_AXIS_LIST_1(V) }
Expand All @@ -62,6 +70,15 @@ struct IF<true, L, R> { typedef L type; };
#define LOGICAL_AXIS_MAP(F) MAP(F, LOGICAL_AXIS_NAMES)
#define STR_AXES_LOGICAL LOGICAL_AXIS_GANG("E", "X", "Y", "Z", STR_I, STR_J, STR_K, STR_U, STR_V, STR_W)

=======
#define LOGICAL_AXIS_ARRAY(E,V...) { LOGICAL_AXIS_LIST(E,V) }
#define LOGICAL_AXIS_ARGS(T...) LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k, T u, T v, T w)
#define LOGICAL_AXIS_ELEM(O) LOGICAL_AXIS_LIST(O.e, O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
#define LOGICAL_AXIS_DECL(T,V) LOGICAL_AXIS_LIST(T e=V, T x=V, T y=V, T z=V, T i=V, T j=V, T k=V, T u=V, T v=V, T w=V)

#define LOGICAL_AXES_STRING LOGICAL_AXIS_GANG("E", "X", "Y", "Z", STR_I, STR_J, STR_K, STR_U, STR_V, STR_W)

>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
#define XYZ_GANG(V...) GANG_N(PRIMARY_LINEAR_AXES, V)
#define XYZ_CODE(V...) CODE_N(PRIMARY_LINEAR_AXES, V)

Expand Down Expand Up @@ -181,6 +198,7 @@ enum AxisEnum : uint8_t {
};

typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
typedef IF<(NUM_AXES > 8), uint16_t, uint8_t>::type linear_axis_bits_t;

//
// Loop over axes
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/core/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ void safe_delay(millis_t ms) {
#if ABL_PLANAR
SERIAL_ECHOPGM("ABL Adjustment");
LOOP_NUM_AXES(a) {
<<<<<<< HEAD
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]));
=======
SERIAL_CHAR(' ', AXIS_CHAR(a));
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
serial_offset(planner.get_axis_position_mm(AxisEnum(a)) - current_position[a]);
}
#else
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/core/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ constexpr uint8_t ui8_to_percent(const uint8_t i) { return (int(i) * 100 + 127)

// Axis names for G-code parsing, reports, etc.
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);
<<<<<<< HEAD
#if NUM_AXES <= XYZ && !HAS_EXTRUDERS
=======
#if NUM_AXES <= XYZ
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
#define AXIS_CHAR(A) ((char)('X' + A))
#define IAXIS_CHAR AXIS_CHAR
#else
Expand Down
12 changes: 12 additions & 0 deletions Marlin/src/feature/backlash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ int32_t Backlash::get_applied_steps(const AxisEnum axis) {
}

class Backlash::StepAdjuster {
<<<<<<< HEAD
private:
xyz_long_t applied_steps;
public:
Expand All @@ -172,6 +173,17 @@ class Backlash::StepAdjuster {
// after backlash compensation parameter changes, ensure applied step count does not change
LOOP_NUM_AXES(axis) residual_error[axis] += backlash.get_applied_steps((AxisEnum)axis) - applied_steps[axis];
}
=======
xyz_long_t applied_steps;
public:
StepAdjuster() {
LOOP_NUM_AXES(axis) applied_steps[axis] = backlash.get_applied_steps((AxisEnum)axis);
}
~StepAdjuster() {
// after backlash compensation parameter changes, ensure applied step count does not change
LOOP_NUM_AXES(axis) residual_error[axis] += backlash.get_applied_steps((AxisEnum)axis) - applied_steps[axis];
}
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
};

#if ENABLED(BACKLASH_GCODE)
Expand Down
25 changes: 25 additions & 0 deletions Marlin/src/gcode/calibrate/M425.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,21 @@ void GcodeSuite::M425() {
#define _CAN_CASE(N) case N##_AXIS: return AXIS_CAN_CALIBRATE(N);
switch (a) {
default: return false;
<<<<<<< HEAD
MAIN_AXIS_MAP(_CAN_CASE)
=======
NUM_AXIS_CODE(
case X_AXIS: return AXIS_CAN_CALIBRATE(X),
case Y_AXIS: return AXIS_CAN_CALIBRATE(Y),
case Z_AXIS: return AXIS_CAN_CALIBRATE(Z),
case I_AXIS: return AXIS_CAN_CALIBRATE(I),
case J_AXIS: return AXIS_CAN_CALIBRATE(J),
case K_AXIS: return AXIS_CAN_CALIBRATE(K),
case U_AXIS: return AXIS_CAN_CALIBRATE(U),
case V_AXIS: return AXIS_CAN_CALIBRATE(V),
case W_AXIS: return AXIS_CAN_CALIBRATE(W)
);
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
}
};

Expand Down Expand Up @@ -83,7 +97,13 @@ void GcodeSuite::M425() {
SERIAL_ECHOLNPGM(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
LOOP_NUM_AXES(a) if (axis_can_calibrate(a)) {
<<<<<<< HEAD
SERIAL_ECHOLNPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]), backlash.get_distance_mm((AxisEnum)a));
=======
SERIAL_CHAR(' ', AXIS_CHAR(a));
SERIAL_ECHO(backlash.get_distance_mm(AxisEnum(a)));
SERIAL_EOL();
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
}

#ifdef BACKLASH_SMOOTHING_MM
Expand All @@ -94,7 +114,12 @@ void GcodeSuite::M425() {
SERIAL_ECHOPGM(" Average measured backlash (mm):");
if (backlash.has_any_measurement()) {
LOOP_NUM_AXES(a) if (axis_can_calibrate(a) && backlash.has_measurement(AxisEnum(a))) {
<<<<<<< HEAD
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]), backlash.get_measurement((AxisEnum)a));
=======
SERIAL_CHAR(' ', AXIS_CHAR(a));
SERIAL_ECHO(backlash.get_measurement(AxisEnum(a)));
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
}
}
else
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/gcode/calibrate/M666.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@
DEBUG_SECTION(log_M666, "M666", DEBUGGING(LEVELING));
bool is_err = false, is_set = false;
LOOP_NUM_AXES(i) {
<<<<<<< HEAD
if (parser.seenval(AXIS_CHAR(i))) {
=======
if (parser.seen(AXIS_CHAR(i))) {
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
is_set = true;
const float v = parser.value_linear_units();
if (v > 0)
Expand Down
32 changes: 32 additions & 0 deletions Marlin/src/gcode/control/M17_M18_M84.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,22 @@ void GcodeSuite::M17() {
stepper.enable_e_steppers();
}
#endif
<<<<<<< HEAD
LOOP_NUM_AXES(a)
if (parser.seen_test(AXIS_CHAR(a))) stepper.enable_axis((AxisEnum)a);
=======
NUM_AXIS_CODE(
if (parser.seen_test('X')) stepper.enable_axis(X_AXIS),
if (parser.seen_test('Y')) stepper.enable_axis(Y_AXIS),
if (parser.seen_test('Z')) stepper.enable_axis(Z_AXIS),
if (parser.seen_test(AXIS4_NAME)) stepper.enable_axis(I_AXIS),
if (parser.seen_test(AXIS5_NAME)) stepper.enable_axis(J_AXIS),
if (parser.seen_test(AXIS6_NAME)) stepper.enable_axis(K_AXIS),
if (parser.seen_test(AXIS7_NAME)) stepper.enable_axis(U_AXIS),
if (parser.seen_test(AXIS8_NAME)) stepper.enable_axis(V_AXIS),
if (parser.seen_test(AXIS9_NAME)) stepper.enable_axis(W_AXIS)
);
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
}
}
else {
Expand Down Expand Up @@ -176,7 +190,11 @@ void try_to_disable(const stepper_flags_t to_disable) {

auto overlap_warning = [](const ena_mask_t axis_bits) {
SERIAL_ECHOPGM(" not disabled. Shared with");
<<<<<<< HEAD
LOOP_NUM_AXES(a) if (TEST(axis_bits, a)) SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_STR[a]));
=======
LOOP_NUM_AXES(a) if (TEST(axis_bits, a)) SERIAL_CHAR(' ', axis_codes[a]);
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
#if HAS_EXTRUDERS
#define _EN_STILLON(N) if (TEST(axis_bits, INDEX_OF_AXIS(E_AXIS, N))) SERIAL_CHAR(' ', 'E', '0' + N);
REPEAT(EXTRUDERS, _EN_STILLON)
Expand Down Expand Up @@ -236,8 +254,22 @@ void GcodeSuite::M18_M84() {
stepper.disable_e_steppers();
}
#endif
<<<<<<< HEAD
LOOP_NUM_AXES(a)
if (parser.seen_test(AXIS_CHAR(a))) stepper.disable_axis((AxisEnum)a);
=======
NUM_AXIS_CODE(
if (parser.seen_test('X')) stepper.disable_axis(X_AXIS),
if (parser.seen_test('Y')) stepper.disable_axis(Y_AXIS),
if (parser.seen_test('Z')) stepper.disable_axis(Z_AXIS),
if (parser.seen_test(AXIS4_NAME)) stepper.disable_axis(I_AXIS),
if (parser.seen_test(AXIS5_NAME)) stepper.disable_axis(J_AXIS),
if (parser.seen_test(AXIS6_NAME)) stepper.disable_axis(K_AXIS),
if (parser.seen_test(AXIS7_NAME)) stepper.disable_axis(U_AXIS),
if (parser.seen_test(AXIS8_NAME)) stepper.disable_axis(V_AXIS),
if (parser.seen_test(AXIS9_NAME)) stepper.disable_axis(W_AXIS)
);
>>>>>>> 0a23f2e7fd (✨ Support for up to 9 axes (#23112, #24036, #24231))
}
}
else
Expand Down
Loading

0 comments on commit e3034a7

Please sign in to comment.