extruder: Support looking up an extruder position from a past time

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-02-22 21:38:33 -05:00
parent 81428265bd
commit d77928b17b
1 changed files with 6 additions and 0 deletions

View File

@ -152,6 +152,10 @@ class PrinterExtruder:
move.start_pos[3], 0., 0.,
1., pressure_advance, 0.,
start_v, cruise_v, accel)
def find_past_position(self, print_time):
mcu = self.stepper.get_mcu()
clock = mcu.print_time_to_clock(print_time)
return self.stepper.get_past_commanded_position(clock)
def cmd_M104(self, gcmd, wait=False):
# Set Extruder Temperature
temp = gcmd.get_float('S', 0.)
@ -220,6 +224,8 @@ class DummyExtruder:
pass
def check_move(self, move):
raise move.move_error("Extrude when no extruder present")
def find_past_position(self, print_time):
return 0.
def calc_junction(self, prev_move, move):
return move.max_cruise_v2
def get_name(self):