From dd3bf2995b42c9040ead3d976493297b519ddf52 Mon Sep 17 00:00:00 2001 From: Farva42 <100859196+Farva42@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:26:56 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Static=20assert=20Dual=20X=20min?= =?UTF-8?q?/max=20(#27701)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a11965a01c..76b9c136d0 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1933,8 +1933,9 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS." #elif X_HOME_TO_MAX #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1." - #elif (X2_HOME_POS <= X1_MAX_POS) || (X2_MAX_POS < X1_MAX_POS) - #error "DUAL_X_CARRIAGE will crash if X1 can meet or exceed X2 travel." + #else + static_assert((X2_HOME_POS) > (X1_MAX_POS), "X2_HOME_POS must be greater than X1_MAX_POS (i.e., X_BED_SIZE)."); + static_assert((X2_MIN_POS) > (X1_MIN_POS), "X2_MIN_POS must be greater than X1_MIN_POS (i.e., X_MIN_POS)."); #endif #endif