diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-09-30 14:47:45 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-09-30 21:27:46 -0400 |
commit | 275b38685603eb34f832dfc3fbd8b63e5f610e18 (patch) | |
tree | 898f2c79748f217a1314f0c233ae0676dd5049f8 /klippy/extruder.py | |
parent | e9505697fb587d7fa46f4c598cb13d20042879d1 (diff) | |
download | kutter-275b38685603eb34f832dfc3fbd8b63e5f610e18.tar.gz kutter-275b38685603eb34f832dfc3fbd8b63e5f610e18.tar.xz kutter-275b38685603eb34f832dfc3fbd8b63e5f610e18.zip |
toolhead: Allow kinematics class to verify the move prior to queuing it
Introduce a check_move() method in the extruder and cartesian
kinematic classes. This allows the lower level classes to verify the
contents of the move prior to queing that move.
The speed and acceleration handling for special Z and extrude only
moves are also moved from the generic toolhead class to the low-level
classes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extruder.py')
-rw-r--r-- | klippy/extruder.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/klippy/extruder.py b/klippy/extruder.py index 3aef5a19..6a7d6c99 100644 --- a/klippy/extruder.py +++ b/klippy/extruder.py @@ -18,10 +18,14 @@ class PrinterExtruder: self.heater.build_config() self.stepper.set_max_jerk(9999999.9) self.stepper.build_config() - def get_max_speed(self): - return self.stepper.max_velocity, self.stepper.max_accel def motor_off(self, move_time): self.stepper.motor_enable(move_time, 0) + def check_move(self, move): + if (not move.do_calc_junction + and not move.axes_d[0] and not move.axes_d[1] + and not move.axes_d[2]): + # Extrude only move - limit accel and velocity + move.limit_speed(self.stepper.max_velocity, self.stepper.max_accel) def move(self, move_time, move): move_d = move.move_d inv_accel = 1. / move.accel |