From 6d0678d9633057dfc338b127d55026a4a28e119d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 9 Dec 2017 07:55:55 -0600 Subject: [PATCH] Omit unused UBL motion code --- Marlin/src/feature/bedlevel/ubl/ubl.h | 7 +++++-- Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h index e7adb083df..01e93769d3 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.h +++ b/Marlin/src/feature/bedlevel/ubl/ubl.h @@ -321,8 +321,11 @@ class unified_bed_leveling { return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST); } - static void line_to_destination_cartesian(const float &fr, const uint8_t e); - static bool prepare_segmented_line_to(const float (&rtarget)[XYZE], const float &feedrate); + #if UBL_SEGMENTED + static bool prepare_segmented_line_to(const float (&rtarget)[XYZE], const float &feedrate); + #else + static void line_to_destination_cartesian(const float &fr, const uint8_t e); + #endif #define _CMPZ(a,b) (z_values[a][b] == z_values[a][b+1]) #define CMPZ(a) (_CMPZ(a, 0) && _CMPZ(a, 1)) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp index 63ea07472c..98d979e6ea 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp @@ -41,6 +41,8 @@ extern void set_current_from_destination(); #endif +#if !UBL_SEGMENTED + void unified_bed_leveling::line_to_destination_cartesian(const float &feed_rate, const uint8_t extruder) { /** * Much of the nozzle movement will be within the same cell. So we will do as little computation @@ -405,7 +407,7 @@ set_current_from_destination(); } - #if UBL_SEGMENTED +#else // UBL_SEGMENTED #if IS_SCARA // scale the feed rate from mm/s to degrees/s static float scara_feed_factor, scara_oldA, scara_oldB; @@ -621,6 +623,6 @@ } // cell loop } - #endif // UBL_SEGMENTED +#endif // UBL_SEGMENTED #endif // AUTO_BED_LEVELING_UBL