mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-16 11:17:52 -06:00
toolhead: Make sure reset_print_time() doesn't go backwards in time
Update the homing code to pass in the start of the homing operation to toolhead.reset_print_time(). This prevents an error when batch processing gcode files that contain multiple homing operations. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
4c40b50fb5
commit
6469cce2bc
2 changed files with 4 additions and 3 deletions
|
@ -257,9 +257,10 @@ class ToolHead:
|
|||
def get_last_move_time(self):
|
||||
self._flush_lookahead()
|
||||
return self.get_next_move_time()
|
||||
def reset_print_time(self):
|
||||
def reset_print_time(self, min_print_time=0.):
|
||||
self._flush_lookahead(must_sync=True)
|
||||
self.print_time = self.mcu.estimated_print_time(self.reactor.monotonic())
|
||||
self.print_time = max(min_print_time, self.mcu.estimated_print_time(
|
||||
self.reactor.monotonic()))
|
||||
def _check_stall(self):
|
||||
eventtime = self.reactor.monotonic()
|
||||
if self.sync_print_time:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue