🧑‍💻 Add AXIS_COLLISION to catch broken parameters

\
x301
Scott Lahteine 3 years ago committed by Scott Lahteine
parent 99c237e05e
commit 5d7328df46

@ -64,6 +64,8 @@ struct IF<true, L, R> { typedef L type; };
#define GANG_ITEM_E(N)
#endif
#define AXIS_COLLISION(L) (AXIS4_NAME == L || AXIS5_NAME == L || AXIS6_NAME == L)
//
// Enumerated axis indices
//

@ -253,7 +253,7 @@ void GcodeSuite::M205() {
if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units();
if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units();
#if HAS_JUNCTION_DEVIATION
#if HAS_CLASSIC_JERK && (AXIS4_NAME == 'J' || AXIS5_NAME == 'J' || AXIS6_NAME == 'J')
#if HAS_CLASSIC_JERK && AXIS_COLLISION('J')
#error "Can't set_max_jerk for 'J' axis because 'J' is used for Junction Deviation."
#endif
if (parser.seenval('J')) {

@ -24,6 +24,10 @@
#if HAS_L64XX
#if AXIS_COLLISION('I')
#error "M906 parameter collision with axis name."
#endif
#include "../../gcode.h"
#include "../../../libs/L64XX/L64XX_Marlin.h"
#include "../../../module/stepper/indirection.h"

@ -24,6 +24,10 @@
#if HAS_STEALTHCHOP
#if AXIS_COLLISION('I')
#error "M569 parameter collision with axis name."
#endif
#include "../../gcode.h"
#include "../../../feature/tmc_util.h"
#include "../../../module/stepper/indirection.h"

@ -24,6 +24,10 @@
#if ENABLED(BEZIER_CURVE_SUPPORT)
#if AXIS_COLLISION('I') || AXIS_COLLISION('J')
#error "G5 parameter collision with axis name."
#endif
#include "../../module/motion.h"
#include "../../module/planner_bezier.h"

Loading…
Cancel
Save