From 158b26b875a05fb3727774e091fdb1cf6c4c0583 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 1 May 2021 20:06:49 -0500 Subject: [PATCH] Fix undefined abl_points --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 735fad015e..3bd96ef495 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -97,6 +97,14 @@ public: int abl_probe_index; #endif + #if ENABLED(AUTO_BED_LEVELING_LINEAR) + int abl_points; + #elif ENABLED(AUTO_BED_LEVELING_3POINT) + static constexpr int abl_points = 3; + #elif ABL_USES_GRID + static constexpr int abl_points = GRID_MAX_POINTS; + #endif + #if ABL_USES_GRID xy_int8_t meshCount; @@ -113,14 +121,6 @@ public: static constexpr xy_uint8_t grid_points = { GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y }; #endif - #if ENABLED(AUTO_BED_LEVELING_LINEAR) - int abl_points; - #elif ENABLED(AUTO_BED_LEVELING_3POINT) - static constexpr int abl_points = 3; - #else - static constexpr int abl_points = GRID_MAX_POINTS; - #endif - #if ENABLED(AUTO_BED_LEVELING_BILINEAR) float Z_offset; #endif