From 90ba77ea0fcaabe604aff9190d42595dd3bb9f2a Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Sat, 30 Jun 2018 18:13:13 -0500
Subject: [PATCH] Lose the old HOMEAXIS macro

---
 Marlin/src/gcode/calibrate/G28.cpp | 16 ++++++++--------
 Marlin/src/module/delta.cpp        |  6 +++---
 Marlin/src/module/motion.h         |  1 -
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp
index 191c2d20ec..166f4651e3 100644
--- a/Marlin/src/gcode/calibrate/G28.cpp
+++ b/Marlin/src/gcode/calibrate/G28.cpp
@@ -129,7 +129,7 @@
       #endif
 
       do_blocking_move_to_xy(destination[X_AXIS], destination[Y_AXIS]);
-      HOMEAXIS(Z);
+      homeaxis(Z_AXIS);
     }
     else {
       LCD_MESSAGEPGM(MSG_ZPROBE_OUT);
@@ -241,7 +241,7 @@ void GcodeSuite::G28(const bool always_home_all) {
 
     #if Z_HOME_DIR > 0  // If homing away from BED do Z first
 
-      if (home_all || homeZ) HOMEAXIS(Z);
+      if (home_all || homeZ) homeaxis(Z_AXIS);
 
     #endif
 
@@ -279,7 +279,7 @@ void GcodeSuite::G28(const bool always_home_all) {
         #if ENABLED(CODEPENDENT_XY_HOMING)
           || homeX
         #endif
-      ) HOMEAXIS(Y);
+      ) homeaxis(Y_AXIS);
 
     #endif
 
@@ -294,14 +294,14 @@ void GcodeSuite::G28(const bool always_home_all) {
 
         // Always home the 2nd (right) extruder first
         active_extruder = 1;
-        HOMEAXIS(X);
+        homeaxis(X_AXIS);
 
         // Remember this extruder's position for later tool change
         inactive_extruder_x_pos = current_position[X_AXIS];
 
         // Home the 1st (left) extruder
         active_extruder = 0;
-        HOMEAXIS(X);
+        homeaxis(X_AXIS);
 
         // Consider the active extruder to be parked
         COPY(raised_parked_position, current_position);
@@ -310,14 +310,14 @@ void GcodeSuite::G28(const bool always_home_all) {
 
       #else
 
-        HOMEAXIS(X);
+        homeaxis(X_AXIS);
 
       #endif
     }
 
     // Home Y (after X)
     #if DISABLED(HOME_Y_BEFORE_X)
-      if (home_all || homeY) HOMEAXIS(Y);
+      if (home_all || homeY) homeaxis(Y_AXIS);
     #endif
 
     // Home Z last if homing towards the bed
@@ -326,7 +326,7 @@ void GcodeSuite::G28(const bool always_home_all) {
         #if ENABLED(Z_SAFE_HOMING)
           home_z_safely();
         #else
-          HOMEAXIS(Z);
+          homeaxis(Z_AXIS);
         #endif
 
         #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
diff --git a/Marlin/src/module/delta.cpp b/Marlin/src/module/delta.cpp
index dded33f9fd..17f9cadc13 100644
--- a/Marlin/src/module/delta.cpp
+++ b/Marlin/src/module/delta.cpp
@@ -278,9 +278,9 @@ bool home_delta() {
 
   // At least one carriage has reached the top.
   // Now re-home each carriage separately.
-  HOMEAXIS(A);
-  HOMEAXIS(B);
-  HOMEAXIS(C);
+  homeaxis(A_AXIS);
+  homeaxis(B_AXIS);
+  homeaxis(C_AXIS);
 
   // Set all carriages to their home positions
   // Do this here all at once for Delta, because
diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h
index e06474654d..71288cb032 100644
--- a/Marlin/src/module/motion.h
+++ b/Marlin/src/module/motion.h
@@ -189,7 +189,6 @@ void clean_up_after_endstop_or_probe_move();
 void set_axis_is_at_home(const AxisEnum axis);
 
 void homeaxis(const AxisEnum axis);
-#define HOMEAXIS(A) homeaxis(_AXIS(A))
 
 #if ENABLED(SENSORLESS_HOMING)
   void sensorless_homing_per_axis(const AxisEnum axis, const bool enable=true);
-- 
GitLab