From a6160916b0a23f8ccac731380ce81554c94bab7c Mon Sep 17 00:00:00 2001
From: Colten Edwards <cd.edwards@sasktel.net>
Date: Tue, 7 Nov 2017 15:36:33 -0600
Subject: [PATCH] [2.0] Fix M48 for delta printers/ABL compile issue (#8286)
* fix M48 for delta printers
fix M48 for delta printers. home printer if not already homed.
* remove ENABLED(DELTA)
remove ENABLED(DELTA) as it is not needed.
* Update M48.cpp
* abl needs queue.h
without queue.h abl will not compile since there is a script that runs at the end of it and we need to queue it up.
---
 Marlin/src/gcode/bedlevel/abl/G29.cpp |  3 ++-
 Marlin/src/gcode/calibrate/M48.cpp    | 11 ++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp
index 0cb57ea0b5..892d71030b 100644
--- a/Marlin/src/gcode/bedlevel/abl/G29.cpp
+++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp
@@ -34,6 +34,7 @@
 #include "../../../module/planner.h"
 #include "../../../module/stepper.h"
 #include "../../../module/probe.h"
+#include "../../queue.h"
 
 #if ENABLED(LCD_BED_LEVELING) && ENABLED(PROBE_MANUALLY)
   #include "../../../lcd/ultralcd.h"
@@ -344,7 +345,7 @@ void GcodeSuite::G29() {
       right_probe_bed_position = parser.seenval('R') ? (int)RAW_X_POSITION(parser.value_linear_units()) : RIGHT_PROBE_BED_POSITION;
       front_probe_bed_position = parser.seenval('F') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : FRONT_PROBE_BED_POSITION;
       back_probe_bed_position  = parser.seenval('B') ? (int)RAW_Y_POSITION(parser.value_linear_units()) : BACK_PROBE_BED_POSITION;
-  
+
       const bool left_out_l = left_probe_bed_position < MIN_PROBE_X,
                  left_out = left_out_l || left_probe_bed_position > right_probe_bed_position - (MIN_PROBE_EDGE),
                  right_out_r = right_probe_bed_position > MAX_PROBE_X,
diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp
index df9b01b7ae..766d3fb91e 100644
--- a/Marlin/src/gcode/calibrate/M48.cpp
+++ b/Marlin/src/gcode/calibrate/M48.cpp
@@ -28,9 +28,9 @@
 #include "../../module/motion.h"
 #include "../../module/probe.h"
 
-#if DISABLED(DELTA)
-  #include "../../feature/bedlevel/bedlevel.h"
-#endif
+
+#include "../../feature/bedlevel/bedlevel.h"
+
 
 #if HAS_LEVELING
   #include "../../module/planner.h"
@@ -49,10 +49,7 @@
  *     L = Number of legs of movement before probe
  *     S = Schizoid (Or Star if you prefer)
  *
- * This function assumes the bed has been homed.  Specifically, that a G28 command
- * as been issued prior to invoking the M48 Z probe repeatability measurement function.
- * Any information generated by a prior G29 Bed leveling command will be lost and need to be
- * regenerated.
+ * This function requires the machine to be homed before invocation.
  */
 void GcodeSuite::M48() {
 
-- 
GitLab