Browse Source

Sanity-check CORE backlash axes (#17279)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
mkpfalz 5 years ago
parent
commit
3260228009
No account linked to committer's email address
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      Marlin/src/inc/SanityCheck.h

+ 5
- 5
Marlin/src/inc/SanityCheck.h View File

@@ -2651,14 +2651,14 @@ static_assert(   _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
2651 2651
 #endif
2652 2652
 
2653 2653
 #if ENABLED(BACKLASH_COMPENSATION)
2654
-  #if IS_CORE
2655
-    #error "BACKLASH_COMPENSATION is incompatible with CORE kinematics."
2656
-  #endif
2657 2654
   #ifndef BACKLASH_DISTANCE_MM
2658 2655
     #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM"
2659
-  #endif
2660
-  #ifndef BACKLASH_CORRECTION
2656
+  #elif !defined(BACKLASH_CORRECTION)
2661 2657
     #error "BACKLASH_COMPENSATION requires BACKLASH_CORRECTION"
2658
+  #elif IS_CORE
2659
+    constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM;
2660
+    static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2],
2661
+                  "BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " with your CORE system.");
2662 2662
   #endif
2663 2663
 #endif
2664 2664
 

Loading…
Cancel
Save