From 4b647a10258c56af533d6eccf4b2249780e46be1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Sep 2018 06:12:37 -0500 Subject: [PATCH] Sanity-check NOZZLE_PARK_POINT --- Marlin/nozzle.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/nozzle.cpp b/Marlin/nozzle.cpp index 8bff692e44..3e2607c58d 100644 --- a/Marlin/nozzle.cpp +++ b/Marlin/nozzle.cpp @@ -161,9 +161,11 @@ #if ENABLED(NOZZLE_PARK_FEATURE) - void Nozzle::park(const uint8_t &z_action, const point_t &park /*= NOZZLE_PARK_POINT*/) { - const float fr_xy = NOZZLE_PARK_XY_FEEDRATE; - const float fr_z = NOZZLE_PARK_Z_FEEDRATE; + constexpr float npp[] = NOZZLE_PARK_POINT; + static_assert(COUNT(npp) == XYZ, "NOZZLE_PARK_POINT requires X, Y, and Z values."); + + void Nozzle::park(const uint8_t &z_action, const point_t &park/*=NOZZLE_PARK_POINT*/) { + const float fr_xy = NOZZLE_PARK_XY_FEEDRATE, fr_z = NOZZLE_PARK_Z_FEEDRATE; switch (z_action) { case 1: // Go to Z-park height