From 2b50fafc2ad3bb1979e1167fa618cdd26aa66419 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sun, 26 May 2019 15:14:17 -0400 Subject: [PATCH] Add bilinear support --- Marlin/Configuration.h | 17 +++++++++++------ Marlin/src/gcode/bedlevel/abl/G29.cpp | 6 +++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 92710e193b..93a96fd2eb 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -53,6 +53,7 @@ #define tallVersion +#define ABL_Bilinear /* * Enables a filament sensor plugged into the laser pin. Disables the laser */ @@ -1283,8 +1284,11 @@ */ //#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_LINEAR -//#define AUTO_BED_LEVELING_BILINEAR -#define AUTO_BED_LEVELING_UBL +#if ENABLED(ABL_Bilinear) + #define AUTO_BED_LEVELING_BILINEAR +#else + #define AUTO_BED_LEVELING_UBL +#endif //#define MESH_BED_LEVELING /** @@ -1309,9 +1313,10 @@ // For Cartesian machines, instead of dividing moves on mesh boundaries, // split up moves into short segments like a Delta. This follows the // contours of the bed more closely than edge-to-edge straight moves. - //#define SEGMENT_LEVELED_MOVES - //#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) - + #if ENABLED(ABL_Bilinear) + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + #endif /** * Enable the G26 Mesh Validation Pattern tool. */ @@ -1329,7 +1334,7 @@ #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. - #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_X 11 #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X // Set the boundaries for probing (where the probe can reach). diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 22cc0c1754..f43cfa6a35 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -55,6 +55,10 @@ #include "../../../lcd/extensible_ui/ui_api.h" #endif +#if HOTENDS > 1 + #include "../../../module/tool_change.h" +#endif + #if ABL_GRID #if ENABLED(PROBE_Y_FIRST) #define PR_OUTER_VAR xCount @@ -280,7 +284,7 @@ G29_TYPE GcodeSuite::G29() { */ if (!g29_in_progress) { - #if ENABLED(DUAL_X_CARRIAGE) + #if HOTENDS > 1 if (active_extruder != 0) tool_change(0); #endif