Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do interpolated moves for Allen Key deploy/stow #4181

Merged
merged 2 commits into from
Jun 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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;

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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;

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down