Skip to content

Commit

Permalink
extruder: Support looking up an extruder position from a past time
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
  • Loading branch information
KevinOConnor authored and tntclaus committed Apr 18, 2021
1 parent 9754042 commit e3074ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions klippy/kinematics/extruder.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ def move(self, print_time, move):
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.)
Expand Down Expand Up @@ -220,6 +224,8 @@ def update_move_time(self, flush_time):
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):
Expand Down

0 comments on commit e3074ca

Please sign in to comment.