From de061ba5d1d1013ba3b118bf66c48ffc03399e8a Mon Sep 17 00:00:00 2001 From: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Mon, 30 Aug 2021 12:49:34 +0200 Subject: [PATCH] fix SAFE_POWER_PROTECT for LINEAR_AXES >= 4 --- Marlin/src/core/types.h | 2 +- Marlin/src/feature/stepper_driver_safety.cpp | 24 +++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index 910ae872cc87..c70020977df1 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -377,7 +377,7 @@ template struct XYZval { union { struct { T LINEAR_AXIS_LIST(x, y, z, i, j, k, m, o, p, q); }; - struct { T LINEAR_AXIS_LIST(a, b, c, u, v, w, ax7, ax8, a9, ax10); }; + struct { T LINEAR_AXIS_LIST(a, b, c, u, v, w, ax7, ax8, ax9, ax10); }; T pos[LINEAR_AXES]; }; diff --git a/Marlin/src/feature/stepper_driver_safety.cpp b/Marlin/src/feature/stepper_driver_safety.cpp index 991f5a5906b4..1359580a846c 100644 --- a/Marlin/src/feature/stepper_driver_safety.cpp +++ b/Marlin/src/feature/stepper_driver_safety.cpp @@ -108,7 +108,7 @@ void stepper_driver_backward_check() { void stepper_driver_backward_report() { if (!axis_plug_backward) return; - auto _report_if_backward = [](PGM_P axis, uint8_t bit) { + auto _report_if_backward = [](PGM_P axis, axis_bit_t bit) { if (TEST(axis_plug_backward, bit)) stepper_driver_backward_error(axis); }; @@ -142,6 +142,28 @@ void stepper_driver_backward_report() { REPORT_BACKWARD(Z4, 7); #endif + #if HAS_I_ENABLE + REPORT_BACKWARD(I, 0); + #endif + #if HAS_J_ENABLE + REPORT_BACKWARD(J, 0); + #endif + #if HAS_K_ENABLE + REPORT_BACKWARD(K, 0); + #endif + #if HAS_M_ENABLE + REPORT_BACKWARD(M, 0); + #endif + #if HAS_O_ENABLE + REPORT_BACKWARD(O, 0); + #endif + #if HAS_P_ENABLE + REPORT_BACKWARD(P, 0); + #endif + #if HAS_Q_ENABLE + REPORT_BACKWARD(Q, 0); + #endif + #if HAS_E0_ENABLE REPORT_BACKWARD(E0, 8); #endif