0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-15 02:36:19 +00:00

🔧 Edge Stepping sanity-check (#25674)

This commit is contained in:
Scott Lahteine 2023-04-14 17:14:04 -05:00 committed by GitHub
parent 161b99cb54
commit efc725863a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 2 deletions

View file

@ -1133,6 +1133,9 @@
#endif
#endif
// Test for edge stepping on any axis
#define AXIS_HAS_DEDGE(A) (ENABLED(EDGE_STEPPING) && AXIS_IS_TMC(A))
#if ENABLED(DIRECT_STEPPING)
#ifndef STEPPER_PAGES
#define STEPPER_PAGES 16

View file

@ -4313,6 +4313,40 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#error "MONITOR_DRIVER_STATUS and SDSUPPORT cannot be used together on boards with shared SPI."
#endif
// Although it just toggles STEP, EDGE_STEPPING requires HIGH state for logic
#if ENABLED(EDGE_STEPPING)
#if AXIS_HAS_DEDGE(X) && STEP_STATE_X != HIGH
#error "STEP_STATE_X must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(Y) && STEP_STATE_Y != HIGH
#error "STEP_STATE_Y must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(Z) && STEP_STATE_Z != HIGH
#error "STEP_STATE_Z must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(I) && STEP_STATE_I != HIGH
#error "STEP_STATE_I must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(J) && STEP_STATE_J != HIGH
#error "STEP_STATE_J must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(K) && STEP_STATE_K != HIGH
#error "STEP_STATE_K must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(U) && STEP_STATE_U != HIGH
#error "STEP_STATE_U must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(V) && STEP_STATE_V != HIGH
#error "STEP_STATE_V must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(W) && STEP_STATE_W != HIGH
#error "STEP_STATE_W must be HIGH for EDGE_STEPPING."
#endif
#if AXIS_HAS_DEDGE(E0) && STEP_STATE_E != HIGH
#error "STEP_STATE_E must be HIGH for EDGE_STEPPING."
#endif
#endif
// G60/G61 Position Save
#if SAVED_POSITIONS > 256
#error "SAVED_POSITIONS must be an integer from 0 to 256."

View file

@ -115,8 +115,6 @@
void restore_trinamic_drivers();
void reset_trinamic_drivers();
#define AXIS_HAS_DEDGE(A) (AXIS_IS_TMC(A) && ENABLED(EDGE_STEPPING))
// X Stepper
#if AXIS_IS_TMC(X)
extern TMC_CLASS(X, X) stepperX;