From c42f8fb8dd69afb5438243099c439ce8b03f3e86 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 30 Jun 2016 15:37:32 -0700 Subject: [PATCH 1/2] Rename some movement sub-functions --- Marlin/Marlin_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 293d165220..1da32e8494 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -7537,7 +7537,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate, #if ENABLED(DUAL_X_CARRIAGE) - inline bool prepare_move_dual_x_carriage() { + inline bool prepare_move_to_destination_dualx() { if (active_extruder_parked) { if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) { // move duplicate extruder into correct duplication position. @@ -7576,7 +7576,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate, #if DISABLED(DELTA) && DISABLED(SCARA) - inline bool prepare_cartesian_move_to_destination() { + inline bool prepare_move_to_destination_cartesian() { // Do not use feedrate_multiplier for E or Z only moves if (current_position[X_AXIS] == destination[X_AXIS] && current_position[Y_AXIS] == destination[Y_AXIS]) { line_to_destination(); @@ -7637,9 +7637,9 @@ void prepare_move_to_destination() { if (!prepare_delta_move_to(destination)) return; #else #if ENABLED(DUAL_X_CARRIAGE) - if (!prepare_move_dual_x_carriage()) return; + if (!prepare_move_to_destination_dualx()) return; #endif - if (!prepare_cartesian_move_to_destination()) return; + if (!prepare_move_to_destination_cartesian()) return; #endif set_current_to_destination(); From da6b0dab5f96f08996f22428087eed0bc7420773 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 30 Jun 2016 16:09:43 -0700 Subject: [PATCH 2/2] Use prepare_move_to_destination for Allen Key deploy/stow --- Marlin/Marlin_main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 1da32e8494..646ec3bd69 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1821,7 +1821,7 @@ static void clean_up_after_endstop_or_probe_move() { destination[X_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_X; destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_Y; destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_Z; - prepare_move_to_destination_raw(); // this will also set_current_to_destination + prepare_move_to_destination(); // this will also set_current_to_destination // Move to engage deployment if (Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE != Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE) @@ -1832,7 +1832,7 @@ static void clean_up_after_endstop_or_probe_move() { destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_2_Y; if (Z_PROBE_ALLEN_KEY_DEPLOY_2_Z != Z_PROBE_ALLEN_KEY_DEPLOY_1_Z) destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_2_Z; - prepare_move_to_destination_raw(); + prepare_move_to_destination(); #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_3_X if (Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE != Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE) @@ -1848,14 +1848,14 @@ static void clean_up_after_endstop_or_probe_move() { if (Z_PROBE_ALLEN_KEY_DEPLOY_3_Z != Z_PROBE_ALLEN_KEY_DEPLOY_2_Z) destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_3_Z; - prepare_move_to_destination_raw(); + prepare_move_to_destination(); #endif } // Partially Home X,Y for safety destination[X_AXIS] *= 0.75; destination[Y_AXIS] *= 0.75; - prepare_move_to_destination_raw(); // this will also set_current_to_destination + prepare_move_to_destination(); // this will also set_current_to_destination feedrate = old_feedrate; @@ -1921,7 +1921,7 @@ static void clean_up_after_endstop_or_probe_move() { destination[X_AXIS] = Z_PROBE_ALLEN_KEY_STOW_1_X; destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_STOW_1_Y; destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_STOW_1_Z; - prepare_move_to_destination_raw(); + prepare_move_to_destination(); // Move the nozzle down to push the Z probe into retracted position if (Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE != Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE) @@ -1931,7 +1931,7 @@ static void clean_up_after_endstop_or_probe_move() { if (Z_PROBE_ALLEN_KEY_STOW_2_Y != Z_PROBE_ALLEN_KEY_STOW_1_Y) destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_STOW_2_Y; destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_STOW_2_Z; - prepare_move_to_destination_raw(); + prepare_move_to_destination(); // Move up for safety if (Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE != Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE) @@ -1941,13 +1941,13 @@ static void clean_up_after_endstop_or_probe_move() { if (Z_PROBE_ALLEN_KEY_STOW_3_Y != Z_PROBE_ALLEN_KEY_STOW_2_Y) destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_STOW_3_Y; destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_STOW_3_Z; - prepare_move_to_destination_raw(); + prepare_move_to_destination(); // Home XY for safety feedrate = homing_feedrate[X_AXIS] / 2; destination[X_AXIS] = 0; destination[Y_AXIS] = 0; - prepare_move_to_destination_raw(); // this will also set_current_to_destination + prepare_move_to_destination(); // this will also set_current_to_destination feedrate = old_feedrate;