소스 검색

Merge pull request #8637 from thinkyhead/bf2_ubl_uses_LSL

[2.0.x] Use custom segment length for UBL Cartesian
Scott Lahteine 7 년 전
부모
커밋
da9f140829
No account linked to committer's email address
2개의 변경된 파일18개의 추가작업 그리고 22개의 파일을 삭제
  1. 18
    7
      Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
  2. 0
    15
      Marlin/src/inc/Conditionals_post.h

+ 18
- 7
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp 파일 보기

484
 
484
 
485
       #elif IS_SCARA  // apply scara inverse_kinematics (should be changed to save raw->logical->raw)
485
       #elif IS_SCARA  // apply scara inverse_kinematics (should be changed to save raw->logical->raw)
486
 
486
 
487
-        inverse_kinematics(raw); // this writes delta[ABC] from raw[XYZE]
488
-                                 // should move the feedrate scaling to scara inverse_kinematics
487
+        inverse_kinematics(raw);  // this writes delta[ABC] from raw[XYZE]
488
+                                  // should move the feedrate scaling to scara inverse_kinematics
489
 
489
 
490
         const float adiff = FABS(delta[A_AXIS] - scara_oldA),
490
         const float adiff = FABS(delta[A_AXIS] - scara_oldA),
491
                     bdiff = FABS(delta[B_AXIS] - scara_oldB);
491
                     bdiff = FABS(delta[B_AXIS] - scara_oldB);
500
         planner._buffer_line(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], raw[E_AXIS], fr, active_extruder);
500
         planner._buffer_line(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], raw[E_AXIS], fr, active_extruder);
501
 
501
 
502
       #endif
502
       #endif
503
-
504
     }
503
     }
505
 
504
 
505
+    #if IS_SCARA
506
+      #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
507
+    #elif ENABLED(DELTA)
508
+      #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
509
+    #else // CARTESIAN
510
+      #ifdef LEVELED_SEGMENT_LENGTH
511
+        #define DELTA_SEGMENT_MIN_LENGTH LEVELED_SEGMENT_LENGTH
512
+      #else
513
+        #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
514
+      #endif
515
+    #endif
506
 
516
 
507
     /**
517
     /**
508
      * Prepare a segmented linear move for DELTA/SCARA/CARTESIAN with UBL and FADE semantics.
518
      * Prepare a segmented linear move for DELTA/SCARA/CARTESIAN with UBL and FADE semantics.
633
           if (--segments == 0)                      // if this is last segment, use rtarget for exact
643
           if (--segments == 0)                      // if this is last segment, use rtarget for exact
634
             COPY(raw, rtarget);
644
             COPY(raw, rtarget);
635
 
645
 
636
-          float z_cxcy = z_cxy0 + z_cxym * cy;      // interpolated mesh z height along cx at cy
637
-          #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
638
-            z_cxcy *= fade_scaling_factor;          // apply fade factor to interpolated mesh height
639
-          #endif
646
+          const float z_cxcy = (z_cxy0 + z_cxym * cy) // interpolated mesh z height along cx at cy
647
+            #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
648
+              * fade_scaling_factor                   // apply fade factor to interpolated mesh height
649
+            #endif
650
+          ;
640
 
651
 
641
           const float z = raw[Z_AXIS];
652
           const float z = raw[Z_AXIS];
642
           raw[Z_AXIS] += z_cxcy;
653
           raw[Z_AXIS] += z_cxcy;

+ 0
- 15
Marlin/src/inc/Conditionals_post.h 파일 보기

1153
   #define LCD_TIMEOUT_TO_STATUS 15000
1153
   #define LCD_TIMEOUT_TO_STATUS 15000
1154
 #endif
1154
 #endif
1155
 
1155
 
1156
-/**
1157
- * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA
1158
- */
1159
-#if UBL_DELTA
1160
-  #ifndef DELTA_SEGMENT_MIN_LENGTH
1161
-    #if IS_SCARA
1162
-      #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
1163
-    #elif ENABLED(DELTA)
1164
-      #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
1165
-    #else // CARTESIAN
1166
-      #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
1167
-    #endif
1168
-  #endif
1169
-#endif
1170
-
1171
 // Shorthand
1156
 // Shorthand
1172
 #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
1157
 #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
1173
 
1158
 

Loading…
취소
저장