From 326022800988855b32ede249e0bb134b93466564 Mon Sep 17 00:00:00 2001 From: mkpfalz <50922721+mkpfalz@users.noreply.github.com> Date: Tue, 24 Mar 2020 20:08:55 +0100 Subject: [PATCH] Sanity-check CORE backlash axes (#17279) Co-authored-by: Scott Lahteine --- Marlin/src/inc/SanityCheck.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f44f93b9a..5814d92bb 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2651,14 +2651,14 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #if ENABLED(BACKLASH_COMPENSATION) - #if IS_CORE - #error "BACKLASH_COMPENSATION is incompatible with CORE kinematics." - #endif #ifndef BACKLASH_DISTANCE_MM #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM" - #endif - #ifndef BACKLASH_CORRECTION + #elif !defined(BACKLASH_CORRECTION) #error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION" + #elif IS_CORE + constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM; + static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2], + "BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " with your CORE system."); #endif #endif