stepper: Improve get_past_commanded_position()

Pass a print_time instead of a clock to get_past_commanded_position().
Fix calculation on steppers that home and use an inverted direction
pin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2021-05-29 21:29:00 -04:00
parent 2bd03b97f0
commit 77bc5e4388
2 changed files with 8 additions and 8 deletions

View File

@@ -152,9 +152,7 @@ class PrinterExtruder:
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)
return self.stepper.get_past_commanded_position(print_time)
def cmd_M104(self, gcmd, wait=False):
# Set Extruder Temperature
temp = gcmd.get_float('S', 0.)