From abeab792cb71a3349f0c6b8113d12c0ac9eda3c7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Apr 2016 20:02:24 -0700 Subject: [PATCH] General cleanup around high level move functions - Use new `DEBUG_POS` macro for `DELTA` debug - Neaten up `prepare_move` a smidgen - Remove an old commented `prepare_move()` line --- Marlin/Marlin_main.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 6b0f52b6a..4864a4600 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2343,7 +2343,6 @@ static void homeaxis(AxisEnum axis) { #else sync_plan_position(); #endif - //prepare_move(); } feedrate = retract_recover_feedrate * 60; @@ -7322,12 +7321,8 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_ adjust_delta(target); #endif - //SERIAL_ECHOPGM("target[X_AXIS]="); SERIAL_ECHOLN(target[X_AXIS]); - //SERIAL_ECHOPGM("target[Y_AXIS]="); SERIAL_ECHOLN(target[Y_AXIS]); - //SERIAL_ECHOPGM("target[Z_AXIS]="); SERIAL_ECHOLN(target[Z_AXIS]); - //SERIAL_ECHOPGM("delta[X_AXIS]="); SERIAL_ECHOLN(delta[X_AXIS]); - //SERIAL_ECHOPGM("delta[Y_AXIS]="); SERIAL_ECHOLN(delta[Y_AXIS]); - //SERIAL_ECHOPGM("delta[Z_AXIS]="); SERIAL_ECHOLN(delta[Z_AXIS]); + //DEBUG_POS("prepare_move_delta", target); + //DEBUG_POS("prepare_move_delta", delta); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], feedrate / 60 * feedrate_multiplier / 100.0, active_extruder); } @@ -7417,13 +7412,10 @@ void prepare_move() { if (!prepare_move_scara(destination)) return; #elif ENABLED(DELTA) if (!prepare_move_delta(destination)) return; - #endif - - #if ENABLED(DUAL_X_CARRIAGE) - if (!prepare_move_dual_x_carriage()) return; - #endif - - #if DISABLED(DELTA) && DISABLED(SCARA) + #else + #if ENABLED(DUAL_X_CARRIAGE) + if (!prepare_move_dual_x_carriage()) return; + #endif if (!prepare_move_cartesian()) return; #endif