diff --git a/klippy/extras/homing.py b/klippy/extras/homing.py index adfd9d062..0ad87882c 100644 --- a/klippy/extras/homing.py +++ b/klippy/extras/homing.py @@ -259,9 +259,10 @@ def _set_current_homing(self, homing_axes): affected_rails = affected_rails | set(partial_rails) for rail in affected_rails: - ch = rail.get_tmc_current_helper() - if ch is not None and ch.needs_home_current_change(): - ch.set_current_for_homing(print_time) + chs = rail.get_tmc_current_helpers() + for ch in chs: + if ch is not None and ch.needs_home_current_change(): + ch.set_current_for_homing(print_time) self.toolhead.dwell(ch.current_change_dwell_time) def _set_current_post_homing(self, homing_axes): diff --git a/klippy/stepper.py b/klippy/stepper.py index 0a79f88ea..3880ab05b 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -400,10 +400,12 @@ def __init__( self.endstop_map = {} self.add_extra_stepper(config) mcu_stepper = self.steppers[0] + self._tmc_current_helpers = [ + s.get_tmc_current_helper() for s in self.steppers + ] self.get_name = mcu_stepper.get_name self.get_commanded_position = mcu_stepper.get_commanded_position self.calc_position_from_coord = mcu_stepper.calc_position_from_coord - self.get_tmc_current_helper = mcu_stepper.get_tmc_current_helper # Primary endstop position mcu_endstop = self.endstops[0][0] if hasattr(mcu_endstop, "get_position_endstop"): @@ -482,6 +484,9 @@ def __init__( % (config.get_name(),) ) + def get_tmc_current_helpers(self): + return self._tmc_current_helpers + def get_range(self): return self.position_min, self.position_max