1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-26 13:25:54 +00:00

🔧 Better BABYSTEP_MULTIPLICATOR_Z sanity-checks (#27471)

This commit is contained in:
ellensp 2024-10-20 16:42:51 +13:00 committed by GitHub
parent b43d6ed5d3
commit b9f7d721ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -500,10 +500,12 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#elif ENABLED(BABYSTEP_XY) && !defined(BABYSTEP_MULTIPLICATOR_XY) #elif ENABLED(BABYSTEP_XY) && !defined(BABYSTEP_MULTIPLICATOR_XY)
#error "BABYSTEP_XY requires BABYSTEP_MULTIPLICATOR_XY." #error "BABYSTEP_XY requires BABYSTEP_MULTIPLICATOR_XY."
#elif ENABLED(BABYSTEP_MILLIMETER_UNITS) #elif ENABLED(BABYSTEP_MILLIMETER_UNITS)
static_assert(BABYSTEP_MULTIPLICATOR_Z <= 0.1f, "BABYSTEP_MULTIPLICATOR_Z must be less or equal to 0.1mm."); static_assert(BABYSTEP_MULTIPLICATOR_Z <= 0.1f, "BABYSTEP_MULTIPLICATOR_Z with BABYSTEP_MILLIMETER_UNITS must be less or equal to 0.1mm.");
#if ENABLED(BABYSTEP_XY) #if ENABLED(BABYSTEP_XY)
static_assert(BABYSTEP_MULTIPLICATOR_XY <= 0.25f, "BABYSTEP_MULTIPLICATOR_XY must be less than or equal to 0.25mm."); static_assert(BABYSTEP_MULTIPLICATOR_XY <= 0.25f, "BABYSTEP_MULTIPLICATOR_XY must be less than or equal to 0.25mm.");
#endif #endif
#else
static_assert(BABYSTEP_MULTIPLICATOR_Z && BABYSTEP_MULTIPLICATOR_Z == int(BABYSTEP_MULTIPLICATOR_Z), "BABYSTEP_MULTIPLICATOR_Z must be a non-zero integer.");
#endif #endif
#endif #endif