Skip to content

Commit

Permalink
Update tmc5160.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HonestBrothers authored Dec 25, 2024
1 parent c509045 commit a3d3d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion klippy/extras/tmc5160.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def _calc_current_bits(self, current):
Ipeak = current * math.sqrt(2)
Rsens = self.sense_resistor
cs = int(math.ceil(Rsens * 32 * Ipeak / 0.32) - 1)
elif:
else:
cs = self.cs
return max(0, min(31, cs))
def _calc_current(self, run_current, hold_current):
Expand Down

0 comments on commit a3d3d77

Please sign in to comment.