toolhead: Keep stepcompress move history relative to current time (#6439)

Expire history relative to current time rather than last move in history queue

Signed-off-by: Francois Chagnon <fc@francoischagnon.net>
This commit is contained in:
Francois Chagnon 2023-12-30 11:34:21 -05:00 committed by GitHub
parent b502558052
commit d7f6348ae6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 54 additions and 27 deletions

View file

@ -211,8 +211,8 @@ class PrinterExtruder:
gcode.register_mux_command("ACTIVATE_EXTRUDER", "EXTRUDER",
self.name, self.cmd_ACTIVATE_EXTRUDER,
desc=self.cmd_ACTIVATE_EXTRUDER_help)
def update_move_time(self, flush_time):
self.trapq_finalize_moves(self.trapq, flush_time)
def update_move_time(self, flush_time, clear_history_time):
self.trapq_finalize_moves(self.trapq, flush_time, clear_history_time)
def get_status(self, eventtime):
sts = self.heater.get_status(eventtime)
sts['can_extrude'] = self.heater.can_extrude
@ -313,7 +313,7 @@ class PrinterExtruder:
class DummyExtruder:
def __init__(self, printer):
self.printer = printer
def update_move_time(self, flush_time):
def update_move_time(self, flush_time, clear_history_time):
pass
def check_move(self, move):
raise move.move_error("Extrude when no extruder present")