Browse Source

Speed up QUICK_HOME feedrate for diagonal move

Speed up the diagonal move while still keeping each individual axis at
or below its homing feedrate.
whosawhatsis 10 years ago
parent
commit
27d544ac25
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      Marlin/Marlin_main.cpp

+ 6
- 1
Marlin/Marlin_main.cpp View File

@@ -1286,7 +1286,12 @@ void process_commands()
1286 1286
         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);
1287 1287
         feedrate = homing_feedrate[X_AXIS];
1288 1288
         if(homing_feedrate[Y_AXIS]<feedrate)
1289
-          feedrate =homing_feedrate[Y_AXIS];
1289
+          feedrate = homing_feedrate[Y_AXIS];
1290
+        if (max_length(X_AXIS) > max_length(Y_AXIS)) {
1291
+          feedrate *= sqrt(pow(max_length(Y_AXIS) / max_length(X_AXIS), 2) + 1);
1292
+        } else {
1293
+          feedrate *= sqrt(pow(max_length(X_AXIS) / max_length(Y_AXIS), 2) + 1);
1294
+        }
1290 1295
         plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
1291 1296
         st_synchronize();
1292 1297
 

Loading…
Cancel
Save