aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-02-22 21:38:33 -0500
committerKevin O'Connor <kevin@koconnor.net>2021-03-13 15:19:43 -0500
commitd77928b17ba6b32189033b3d6decdb5bcc7c342c (patch)
tree3f5c591705409e19049a9357d57b27dd32118e2c /klippy/kinematics
parent81428265bdcd5db02bd981975e0a8d43bdc2415f (diff)
downloadkutter-d77928b17ba6b32189033b3d6decdb5bcc7c342c.tar.gz
kutter-d77928b17ba6b32189033b3d6decdb5bcc7c342c.tar.xz
kutter-d77928b17ba6b32189033b3d6decdb5bcc7c342c.zip
extruder: Support looking up an extruder position from a past time
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/kinematics')
-rw-r--r--klippy/kinematics/extruder.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/klippy/kinematics/extruder.py b/klippy/kinematics/extruder.py
index e767abef..71f7b382 100644
--- a/klippy/kinematics/extruder.py
+++ b/klippy/kinematics/extruder.py
@@ -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):