Skip to content

Commit

Permalink
fix SAFE_POWER_PROTECT for LINEAR_AXES >= 4
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndere1 committed Aug 30, 2021
1 parent 2b9da14 commit de061ba
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ template<typename T>
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];
};

Expand Down
24 changes: 23 additions & 1 deletion Marlin/src/feature/stepper_driver_safety.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit de061ba

Please sign in to comment.