Sanity-check nozzle park point (#17621)

This commit is contained in:
Ondřej Nový 2020-04-20 13:54:24 +02:00 committed by GitHub
parent 15f6f53638
commit a0d0ce464e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -806,6 +806,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#if ENABLED(NOZZLE_PARK_FEATURE)
constexpr float npp[] = NOZZLE_PARK_POINT;
static_assert(COUNT(npp) == XYZ, "NOZZLE_PARK_POINT requires X, Y, and Z values.");
constexpr xyz_pos_t npp_xyz = NOZZLE_PARK_POINT;
static_assert(WITHIN(npp_xyz.x, X_MIN_POS, X_MAX_POS), "NOZZLE_PARK_POINT.X is out of bounds (X_MIN_POS, X_MAX_POS).");
static_assert(WITHIN(npp_xyz.y, Y_MIN_POS, Y_MAX_POS), "NOZZLE_PARK_POINT.Y is out of bounds (Y_MIN_POS, Y_MAX_POS).");
static_assert(WITHIN(npp_xyz.z, Z_MIN_POS, Z_MAX_POS), "NOZZLE_PARK_POINT.Z is out of bounds (Z_MIN_POS, Z_MAX_POS).");
#endif
/**