Parcourir la source

Sanity-check BABYSTEP_MULTIPLICATOR_*

Scott Lahteine il y a 3 ans
Parent
révision
11e29754e6
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9
    0
      Marlin/src/inc/SanityCheck.h

+ 9
- 0
Marlin/src/inc/SanityCheck.h Voir le fichier

771
     #error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS."
771
     #error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS."
772
   #elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
772
   #elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
773
     #error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible."
773
     #error "BABYSTEP_ALWAYS_AVAILABLE and MOVE_Z_WHEN_IDLE are incompatible."
774
+  #elif !defined(BABYSTEP_MULTIPLICATOR_Z)
775
+    #error "BABYSTEPPING requires BABYSTEP_MULTIPLICATOR_Z."
776
+  #elif ENABLED(BABYSTEP_XY) && !defined(BABYSTEP_MULTIPLICATOR_XY)
777
+    #error "BABYSTEP_XY requires BABYSTEP_MULTIPLICATOR_XY."
778
+  #elif ENABLED(BABYSTEP_MILLIMETER_UNITS)
779
+    static_assert(BABYSTEP_MULTIPLICATOR_Z <= 0.1f, "BABYSTEP_MULTIPLICATOR_Z must be less or equal to 0.1mm.");
780
+    #if ENABLED(BABYSTEP_XY)
781
+      static_assert(BABYSTEP_MULTIPLICATOR_XY <= 0.25f, "BABYSTEP_MULTIPLICATOR_XY must be less than or equal to 0.25mm.");
782
+    #endif
774
   #endif
783
   #endif
775
 #endif
784
 #endif
776
 
785
 

Chargement…
Annuler
Enregistrer