Skip to content

Commit

Permalink
Speed up QUICK_HOME feedrate for diagonal move
Browse files Browse the repository at this point in the history
Speed up the diagonal move while still keeping each individual axis at
or below its homing feedrate.
  • Loading branch information
whosawhatsis committed Apr 20, 2014
1 parent 013793b commit 27d544a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,12 @@ void process_commands()
destination[X_AXIS] = 1.5 * max_length(X_AXIS) * x_axis_home_dir;destination[Y_AXIS] = 1.5 * max_length(Y_AXIS) * home_dir(Y_AXIS);
feedrate = homing_feedrate[X_AXIS];
if(homing_feedrate[Y_AXIS]<feedrate)
feedrate =homing_feedrate[Y_AXIS];
feedrate = homing_feedrate[Y_AXIS];
if (max_length(X_AXIS) > max_length(Y_AXIS)) {
feedrate *= sqrt(pow(max_length(Y_AXIS) / max_length(X_AXIS), 2) + 1);
} else {
feedrate *= sqrt(pow(max_length(X_AXIS) / max_length(Y_AXIS), 2) + 1);
}
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
st_synchronize();

Expand Down

0 comments on commit 27d544a

Please sign in to comment.