🧑‍💻 Add AXIS_COLLISION to catch broken parameters

\
This commit is contained in:
Scott Lahteine 2021-12-28 05:02:40 -06:00 committed by Scott Lahteine
parent 99c237e05e
commit 5d7328df46
5 changed files with 15 additions and 1 deletions

View File

@ -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
//

View File

@ -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')) {

View File

@ -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"

View File

@ -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"

View File

@ -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"