From 1df6c7a46c3be610377ee2fe33cef36cad5ef255 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 8 Oct 2019 19:27:03 -0500 Subject: [PATCH] Work around a compiler bug See #15478 --- Marlin/src/inc/Conditionals_post.h | 5 ----- Marlin/src/module/planner.cpp | 9 +++++++++ Marlin/src/module/planner.h | 1 - 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 6c1f173f94..631bba887e 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -220,11 +220,6 @@ #ifndef Z_SAFE_HOMING_Y_POINT #define Z_SAFE_HOMING_Y_POINT _SAFE_POINT(Y) #endif - #define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT - #define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT -#else - #define X_TILT_FULCRUM X_HOME_POS - #define Y_TILT_FULCRUM Y_HOME_POS #endif /** diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 62747af431..17308e48fe 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1350,6 +1350,15 @@ void Planner::check_axes_activity() { #endif #if HAS_LEVELING + + constexpr xy_pos_t level_fulcrum = { + #if ENABLED(Z_SAFE_HOMING) + Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT + #else + X_HOME_POS, Y_HOME_POS + #endif + }; + /** * rx, ry, rz - Cartesian positions in mm * Leveled XYZ on completion diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index e547ead80f..fd05c6a866 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -268,7 +268,6 @@ class Planner { static bool leveling_active; // Flag that bed leveling is enabled #if ABL_PLANAR static matrix_3x3 bed_level_matrix; // Transform to compensate for bed level - static constexpr xy_pos_t level_fulcrum = { X_TILT_FULCRUM, Y_TILT_FULCRUM }; #endif #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) static float z_fade_height, inverse_z_fade_height;