🚸 Strict index 2 for M913 / M914 XY (#24680)

This commit is contained in:
Giuliano Zaro
2022-09-01 21:16:52 +02:00
committed by Scott Lahteine
parent 2fc97aa240
commit 5fe1f66478
2 changed files with 10 additions and 5 deletions

View File

@ -2044,6 +2044,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
);
#endif
#define COUNT_SENSORLESS COUNT_ENABLED(Z_SENSORLESS, Z2_SENSORLESS, Z3_SENSORLESS, Z4_SENSORLESS)
#if COUNT_SENSORLESS && COUNT_SENSORLESS != NUM_Z_STEPPERS
#error "All Z steppers must have *_STALL_SENSITIVITY defined to use Z sensorless homing."
#endif
#undef COUNT_SENSORLESS
#ifdef SENSORLESS_BACKOFF_MM
constexpr float sbm[] = SENSORLESS_BACKOFF_MM;
static_assert(COUNT(sbm) == NUM_AXES, "SENSORLESS_BACKOFF_MM must have " _NUM_AXES_STR "elements (and no others).");