瀏覽代碼

Omit unused UBL motion code

Scott Lahteine 7 年之前
父節點
當前提交
6d0678d963
共有 2 個文件被更改,包括 9 次插入4 次删除
  1. 5
    2
      Marlin/src/feature/bedlevel/ubl/ubl.h
  2. 4
    2
      Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp

+ 5
- 2
Marlin/src/feature/bedlevel/ubl/ubl.h 查看文件

@@ -321,8 +321,11 @@ class unified_bed_leveling {
321 321
       return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST);
322 322
     }
323 323
 
324
-    static void line_to_destination_cartesian(const float &fr, const uint8_t e);
325
-    static bool prepare_segmented_line_to(const float (&rtarget)[XYZE], const float &feedrate);
324
+    #if UBL_SEGMENTED
325
+      static bool prepare_segmented_line_to(const float (&rtarget)[XYZE], const float &feedrate);
326
+    #else
327
+      static void line_to_destination_cartesian(const float &fr, const uint8_t e);
328
+    #endif
326 329
 
327 330
     #define _CMPZ(a,b) (z_values[a][b] == z_values[a][b+1])
328 331
     #define CMPZ(a) (_CMPZ(a, 0) && _CMPZ(a, 1))

+ 4
- 2
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp 查看文件

@@ -41,6 +41,8 @@
41 41
     extern void set_current_from_destination();
42 42
   #endif
43 43
 
44
+#if !UBL_SEGMENTED
45
+
44 46
   void unified_bed_leveling::line_to_destination_cartesian(const float &feed_rate, const uint8_t extruder) {
45 47
     /**
46 48
      * Much of the nozzle movement will be within the same cell. So we will do as little computation
@@ -405,7 +407,7 @@
405 407
     set_current_from_destination();
406 408
   }
407 409
 
408
-  #if UBL_SEGMENTED
410
+#else // UBL_SEGMENTED
409 411
 
410 412
     #if IS_SCARA // scale the feed rate from mm/s to degrees/s
411 413
       static float scara_feed_factor, scara_oldA, scara_oldB;
@@ -621,6 +623,6 @@
621 623
       } // cell loop
622 624
     }
623 625
 
624
-  #endif // UBL_SEGMENTED
626
+#endif // UBL_SEGMENTED
625 627
 
626 628
 #endif // AUTO_BED_LEVELING_UBL

Loading…
取消
儲存