Browse Source

Use custom segment length for UBL Cartesian

Scott Lahteine 6 years ago
parent
commit
db8631e49a
3 changed files with 13 additions and 16 deletions
  1. 0
    15
      Marlin/Conditionals_post.h
  2. 2
    1
      Marlin/planner.cpp
  3. 11
    0
      Marlin/ubl_motion.cpp

+ 0
- 15
Marlin/Conditionals_post.h View File

@@ -1101,21 +1101,6 @@
1101 1101
     #define LCD_TIMEOUT_TO_STATUS 15000
1102 1102
   #endif
1103 1103
 
1104
-  /**
1105
-   * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA
1106
-   */
1107
-  #if UBL_DELTA
1108
-    #ifndef DELTA_SEGMENT_MIN_LENGTH
1109
-      #if IS_SCARA
1110
-        #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
1111
-      #elif ENABLED(DELTA)
1112
-        #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
1113
-      #else // CARTESIAN
1114
-        #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
1115
-      #endif
1116
-    #endif
1117
-  #endif
1118
-
1119 1104
   // Shorthand
1120 1105
   #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
1121 1106
 

+ 2
- 1
Marlin/planner.cpp View File

@@ -569,6 +569,7 @@ void Planner::calculate_volumetric_multipliers() {
569 569
 #if PLANNER_LEVELING
570 570
   /**
571 571
    * rx, ry, rz - Cartesian positions in mm
572
+   *              Leveled XYZ on completion
572 573
    */
573 574
   void Planner::apply_leveling(float &rx, float &ry, float &rz) {
574 575
 
@@ -611,7 +612,7 @@ void Planner::calculate_volumetric_multipliers() {
611 612
       #endif
612 613
 
613 614
       rz += (
614
-        #if ENABLED(AUTO_BED_LEVELING_UBL)
615
+        #if ENABLED(AUTO_BED_LEVELING_UBL) // UBL_DELTA
615 616
           ubl.get_z_correction(rx, ry) * fade_scaling_factor
616 617
         #elif ENABLED(MESH_BED_LEVELING)
617 618
           mbl.get_z(rx, ry

+ 11
- 0
Marlin/ubl_motion.cpp View File

@@ -497,6 +497,17 @@
497 497
       #endif
498 498
     }
499 499
 
500
+    #if IS_SCARA
501
+      #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
502
+    #elif ENABLED(DELTA)
503
+      #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
504
+    #else // CARTESIAN
505
+      #ifdef LEVELED_SEGMENT_LENGTH
506
+        #define DELTA_SEGMENT_MIN_LENGTH LEVELED_SEGMENT_LENGTH
507
+      #else
508
+        #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
509
+      #endif
510
+    #endif
500 511
 
501 512
     /**
502 513
      * Prepare a segmented linear move for DELTA/SCARA/CARTESIAN with UBL and FADE semantics.

Loading…
Cancel
Save