Browse Source

Make EXTRUDER_RUNOUT_PREVENT kinematic compatible

Scott Lahteine 8 years ago
parent
commit
e4e290d957
1 changed files with 16 additions and 5 deletions
  1. 16
    5
      Marlin/Marlin_main.cpp

+ 16
- 5
Marlin/Marlin_main.cpp View File

@@ -9463,11 +9463,22 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
9463 9463
       #endif // !SWITCHING_EXTRUDER
9464 9464
 
9465 9465
       previous_cmd_ms = ms; // refresh_cmd_timeout()
9466
-      planner.buffer_line(
9467
-        current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
9468
-        current_position[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE,
9469
-        MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder
9470
-      );
9466
+
9467
+      #if IS_KINEMATIC
9468
+        inverse_kinematics(current_position);
9469
+        ADJUST_DELTA(current_position);
9470
+        planner.buffer_line(
9471
+          delta[A_AXIS], delta[B_AXIS], delta[C_AXIS],
9472
+          current_position[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE,
9473
+          MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder
9474
+        );
9475
+      #else
9476
+        planner.buffer_line(
9477
+          current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
9478
+          current_position[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE,
9479
+          MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder
9480
+        );
9481
+      #endif
9471 9482
       stepper.synchronize();
9472 9483
       planner.set_e_position_mm(current_position[E_AXIS]);
9473 9484
       #if ENABLED(SWITCHING_EXTRUDER)

Loading…
Cancel
Save