mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-09 23:05:05 -06:00
toolhead: Support step generation in lead up to and after stepper activity
Add support for kinematic functions that calculate step times based on a range of the motion queue. This requires adding additional pause times when fully flushing the motion queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
56cd39f038
commit
d00023f3bb
2 changed files with 42 additions and 19 deletions
|
@ -59,7 +59,6 @@ class PrinterExtruder:
|
|||
self.stepper.setup_itersolve('extruder_stepper_alloc')
|
||||
self.stepper.set_trapq(self.trapq)
|
||||
toolhead.register_step_generator(self.stepper.generate_steps)
|
||||
toolhead.register_step_generator(self._free_moves)
|
||||
# Register commands
|
||||
gcode = self.printer.lookup_object('gcode')
|
||||
if self.name == 'extruder':
|
||||
|
@ -70,7 +69,7 @@ class PrinterExtruder:
|
|||
gcode.register_mux_command("SET_PRESSURE_ADVANCE", "EXTRUDER",
|
||||
self.name, self.cmd_SET_PRESSURE_ADVANCE,
|
||||
desc=self.cmd_SET_PRESSURE_ADVANCE_help)
|
||||
def _free_moves(self, flush_time):
|
||||
def update_move_time(self, flush_time):
|
||||
self.trapq_free_moves(self.trapq, flush_time)
|
||||
def get_status(self, eventtime):
|
||||
return dict(
|
||||
|
@ -230,6 +229,8 @@ class PrinterExtruder:
|
|||
class DummyExtruder:
|
||||
def set_active(self, print_time, is_active):
|
||||
return 0.
|
||||
def update_move_time(self, flush_time):
|
||||
pass
|
||||
def check_move(self, move):
|
||||
raise homing.EndstopMoveError(
|
||||
move.end_pos, "Extrude when no extruder present")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue