From 3afda99adf57209ecd99b890cee7911970a0d64a Mon Sep 17 00:00:00 2001
From: Scott Lahteine <sourcetree@thinkyhead.com>
Date: Thu, 23 Jun 2016 17:04:13 -0700
Subject: [PATCH] Regular handlers for G31 / G32

---
 Marlin/Marlin_main.cpp | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index 369e799774..dd130529a4 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -3876,6 +3876,20 @@ inline void gcode_G28() {
     report_current_position();
   }
 
+  #if ENABLED(Z_PROBE_SLED)
+
+    /**
+     * G31: Deploy the Z probe
+     */
+    inline void gcode_G31() { deploy_z_probe(); }
+
+    /**
+     * G32: Stow the Z probe
+     */
+    inline void gcode_G32() { stow_z_probe(); }
+
+  #endif // Z_PROBE_SLED
+
 #endif // HAS_BED_PROBE
 
 /**
@@ -6865,10 +6879,11 @@ void process_next_command() {
         #if ENABLED(Z_PROBE_SLED)
 
             case 31: // G31: dock the sled
-              stow_z_probe();
+              gcode_G31();
               break;
+
             case 32: // G32: undock the sled
-              deploy_z_probe();
+              gcode_G32();
               break;
 
         #endif // Z_PROBE_SLED
-- 
GitLab