Sanity-check Z_STEPPER_AUTO_ALIGN coordinates (#16231)

This commit is contained in:
Moshi Binyamini
2019-12-19 08:59:01 +02:00
committed by Scott Lahteine
parent 0400783444
commit dcdaa2025f
124 changed files with 155 additions and 139 deletions

View File

@ -2353,24 +2353,13 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
#endif
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
#if !Z_MULTI_STEPPER_DRIVERS
#error "Z_STEPPER_AUTO_ALIGN requires Z_DUAL_STEPPER_DRIVERS or Z_TRIPLE_STEPPER_DRIVERS."
#elif !HAS_BED_PROBE
#error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
#elif ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) && DISABLED(Z_TRIPLE_STEPPER_DRIVERS)
#error "Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS requires Z_TRIPLE_STEPPER_DRIVERS."
#endif
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
#if DISABLED(Z_TRIPLE_STEPPER_DRIVERS)
#error "Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS requires Z_TRIPLE_STEPPER_DRIVERS."
#endif
constexpr float sanity_arr_screw_xy[][2] = Z_STEPPER_ALIGN_STEPPER_XY;
static_assert(
COUNT(sanity_arr_screw_xy) == Z_STEPPER_COUNT,
"Z_STEPPER_ALIGN_STEPPER_XY requires three {X,Y} entries (one per Z stepper)."
);
#endif
#endif
#if ENABLED(PRINTCOUNTER) && DISABLED(EEPROM_SETTINGS)