Skip to content

Commit

Permalink
Revert "bugfix: restore run_current after sensorless homing (#233)" (#…
Browse files Browse the repository at this point in the history
…235)

This reverts commit a478116.
  • Loading branch information
rogerlz authored May 10, 2024
1 parent a478116 commit 7f793c6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion klippy/extras/homing.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def _set_current_post_homing(self, homing_axes):
chs = rail.get_tmc_current_helpers()
dwell_time = None
for ch in chs:
if ch is not None and ch.needs_run_current_change():
if ch is not None and ch.needs_home_current_change():
if dwell_time is None:
dwell_time = ch.current_change_dwell_time
ch.set_current_for_normal(print_time)
Expand Down
5 changes: 1 addition & 4 deletions klippy/extras/tmc2130.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,6 @@ def __init__(self, config, mcu_tmc):
def needs_home_current_change(self):
return self._home_current != self.run_current

def needs_run_current_change(self):
return self._prev_current != self.run_current

def set_home_current(self, new_home_current):
self._home_current = min(MAX_CURRENT, new_home_current)

Expand Down Expand Up @@ -284,7 +281,7 @@ def get_current(self):

def set_current(self, run_current, hold_current, print_time, force=False):
if (
run_current == self.run_current
run_current == self._prev_current
and hold_current == self.req_hold_current
and not force
):
Expand Down
5 changes: 1 addition & 4 deletions klippy/extras/tmc2240.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ def __init__(self, config, mcu_tmc):
def needs_home_current_change(self):
return self._home_current != self.run_current

def needs_run_current_change(self):
return self._prev_current != self.run_current

def set_home_current(self, new_home_current):
self._home_current = min(self.max_cur, new_home_current)

Expand Down Expand Up @@ -363,7 +360,7 @@ def get_current(self):

def set_current(self, run_current, hold_current, print_time, force=False):
if (
run_current == self.run_current
run_current == self._prev_current
and hold_current == self.req_hold_current
and not force
):
Expand Down
3 changes: 0 additions & 3 deletions klippy/extras/tmc2660.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ def __init__(self, config, mcu_tmc):
def needs_home_current_change(self):
return self._home_current != self.current

def needs_run_current_change(self):
return self._prev_current != self.current

def set_home_current(self, new_home_current):
self._home_current = min(MAX_CURRENT, new_home_current)

Expand Down
5 changes: 1 addition & 4 deletions klippy/extras/tmc5160.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ def __init__(self, config, mcu_tmc):
def needs_home_current_change(self):
return self._home_current != self.run_current

def needs_run_current_change(self):
return self._prev_current != self.run_current

def set_home_current(self, new_home_current):
self._home_current = min(MAX_CURRENT, new_home_current)

Expand Down Expand Up @@ -341,7 +338,7 @@ def get_current(self):

def set_current(self, run_current, hold_current, print_time, force=False):
if (
run_current == self.run_current
run_current == self._prev_current
and hold_current == self.req_hold_current
and not force
):
Expand Down

0 comments on commit 7f793c6

Please sign in to comment.