Skip to content

Commit

Permalink
LINEAR_AXES => NUM_AXES, LINEAR_AXIS_GANG => NUM_AXIS_GANG,...
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndere1 committed Dec 21, 2021
1 parent 9b5eb26 commit 5d56cba
Show file tree
Hide file tree
Showing 66 changed files with 790 additions and 813 deletions.
14 changes: 7 additions & 7 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
*
* :[3, 4, 5, 6, 7, 8, 9]
*/
//#define LINEAR_AXES 3
//#define NUM_AXES 3

/**
* Settings for additional axes:
Expand All @@ -181,27 +181,27 @@
* Regardless of the settings, firmware-internal axis IDs are
* I (AXIS4), J (AXIS5), K (AXIS6), U (AXIS7), V (AXIS8), W (AXIS9).
*/
#if LINEAR_AXES >= 4
#if NUM_AXES >= 4
#define HAS_ROTATIONAL_AXIS4 true
#define AXIS4_NAME 'A' // :['A', 'B', 'C', 'U', 'V', 'W']
#endif
#if LINEAR_AXES >= 5
#if NUM_AXES >= 5
#define HAS_ROTATIONAL_AXIS5 true // "true" requires HAS_ROTATIONAL_AXIS4 true
#define AXIS5_NAME 'B' // :['B', 'C', 'U', 'V', 'W']
#endif
#if LINEAR_AXES >= 6
#if NUM_AXES >= 6
#define HAS_ROTATIONAL_AXIS6 true // "true" requires that all axes above are also rotational
#define AXIS6_NAME 'C' // :['C', 'U', 'V', 'W']
#endif
#if LINEAR_AXES >= 7
#if NUM_AXES >= 7
#define HAS_ROTATIONAL_AXIS7 false // "true" requires that all axes above are also rotational
#define AXIS7_NAME 'U' // :['U', 'V', 'W']
#endif
#if LINEAR_AXES >= 8
#if NUM_AXES >= 8
#define HAS_ROTATIONAL_AXIS8 false // "true" requires that all axes above are also rotational
#define AXIS8_NAME 'V' // :['V', 'W']
#endif
#if LINEAR_AXES >= 9
#if NUM_AXES >= 9
#define HAS_ROTATIONAL_AXIS9 false // "true" requires that all axes above are also rotational
#define AXIS9_NAME 'W' // :['W']
#endif
Expand Down
4 changes: 2 additions & 2 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,7 @@

/**
* Safe bed leveling start coordinates. If enabled, the respective axis is moved to the specified position at the beginning of the bed leveling procedure.
* Required e.g. with LINEAR_AXES >= 4, if Z probe is not perpendicular to the bed after homing.
* Required e.g. with NUM_AXES >= 4, if Z probe is not perpendicular to the bed after homing.
* Values must be chosen so that the bed is oriented horizontally and so that the Z-probe is oriented vertically.
*/
//#define SAFE_BED_LEVELING_START_X 0.0
Expand Down Expand Up @@ -2408,7 +2408,7 @@

/**
* Extra G-code to run while executing tool-change commands. Can be used to use an additional
* stepper motor (I axis, see option LINEAR_AXES in Configuration.h) to drive the tool-changer.
* stepper motor (I axis, see option NUM_AXES in Configuration.h) to drive the tool-changer.
*/
//#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
12 changes: 6 additions & 6 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
#define LCD_STR_E STR_E

// Extra Axis and Endstop Names
#if LINEAR_AXES >= 4
#if NUM_AXES >= 4
#if AXIS4_NAME == 'A'
#define AXIS4_STR "A"
#define STR_I_MIN "a_min"
Expand Down Expand Up @@ -406,7 +406,7 @@
#define AXIS4_STR ""
#endif

#if LINEAR_AXES >= 5
#if NUM_AXES >= 5
#if AXIS5_NAME == 'B'
#define AXIS5_STR "B"
#define STR_J_MIN "b_min"
Expand Down Expand Up @@ -434,7 +434,7 @@
#define AXIS5_STR ""
#endif

#if LINEAR_AXES >= 6
#if NUM_AXES >= 6
#if AXIS6_NAME == 'C'
#define AXIS6_STR "C"
#define STR_K_MIN "c_min"
Expand All @@ -458,7 +458,7 @@
#define AXIS6_STR ""
#endif

#if LINEAR_AXES >= 7
#if NUM_AXES >= 7
#if AXIS7_NAME == 'U'
#define AXIS7_STR "U"
#define STR_U_MIN "u_min"
Expand All @@ -478,7 +478,7 @@
#define AXIS7_STR ""
#endif

#if LINEAR_AXES >= 8
#if NUM_AXES >= 8
#if AXIS8_NAME == 'V'
#define AXIS8_STR "V"
#define STR_V_MIN "v_min"
Expand All @@ -494,7 +494,7 @@
#define AXIS8_STR ""
#endif

#if LINEAR_AXES >= 9
#if NUM_AXES >= 9
#if AXIS9_NAME == 'W'
#define AXIS9_STR "W"
#define STR_W_MIN "w_min"
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/core/serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ void print_bin(uint16_t val) {
}
}

void print_pos(LINEAR_AXIS_ARGS(const_float_t), FSTR_P const prefix/*=nullptr*/, FSTR_P const suffix/*=nullptr*/) {
void print_pos(NUM_AXIS_ARGS(const_float_t), FSTR_P const prefix/*=nullptr*/, FSTR_P const suffix/*=nullptr*/) {
if (prefix) serial_print(prefix);
SERIAL_ECHOPGM_P(
LIST_N(DOUBLE(LINEAR_AXES), SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z, SP_I_STR, i, SP_J_STR, j, SP_K_STR, k, SP_U_STR, u, SP_V_STR, v, SP_W_STR, w)
LIST_N(DOUBLE(NUM_AXES), SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z, SP_I_STR, i, SP_J_STR, j, SP_K_STR, k, SP_U_STR, u, SP_V_STR, v, SP_W_STR, w)
);
if (suffix) serial_print(suffix); else SERIAL_EOL();
}
4 changes: 2 additions & 2 deletions Marlin/src/core/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ void serialprint_truefalse(const bool tf);
void serial_spaces(uint8_t count);

void print_bin(const uint16_t val);
void print_pos(LINEAR_AXIS_ARGS(const_float_t), FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
void print_pos(NUM_AXIS_ARGS(const_float_t), FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);

inline void print_pos(const xyz_pos_t &xyz, FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr) {
print_pos(LINEAR_AXIS_ELEM(xyz), prefix, suffix);
print_pos(NUM_AXIS_ELEM(xyz), prefix, suffix);
}

#define SERIAL_POS(SUFFIX,VAR) do { print_pos(VAR, F(" " STRINGIFY(VAR) "="), F(" : " SUFFIX "\n")); }while(0)
Expand Down
Loading

0 comments on commit 5d56cba

Please sign in to comment.