소스 검색

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
       return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST);
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
     #define _CMPZ(a,b) (z_values[a][b] == z_values[a][b+1])
330
     #define _CMPZ(a,b) (z_values[a][b] == z_values[a][b+1])
328
     #define CMPZ(a) (_CMPZ(a, 0) && _CMPZ(a, 1))
331
     #define CMPZ(a) (_CMPZ(a, 0) && _CMPZ(a, 1))

+ 4
- 2
Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp 파일 보기

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

Loading…
취소
저장