Browse Source

Sanity-check nozzle park point (#17621)

Ondřej Nový 5 years ago
parent
commit
a0d0ce464e
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      Marlin/src/inc/SanityCheck.h

+ 4
- 0
Marlin/src/inc/SanityCheck.h View File

@@ -806,6 +806,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
806 806
 #if ENABLED(NOZZLE_PARK_FEATURE)
807 807
   constexpr float npp[] = NOZZLE_PARK_POINT;
808 808
   static_assert(COUNT(npp) == XYZ, "NOZZLE_PARK_POINT requires X, Y, and Z values.");
809
+  constexpr xyz_pos_t npp_xyz = NOZZLE_PARK_POINT;
810
+  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).");
811
+  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).");
812
+  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).");
809 813
 #endif
810 814
 
811 815
 /**

Loading…
Cancel
Save