Merge pull request #888 from whosawhatsis/quick_home
Speed up QUICK_HOME feedrate for diagonal move
This commit is contained in:
commit
5107018414
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
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];
|
feedrate = homing_feedrate[X_AXIS];
|
||||||
if(homing_feedrate[Y_AXIS]<feedrate)
|
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);
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
||||||
|
|
Reference in a new issue