diff options
author | Alex Voinea <voinea.dragos.alexandru@gmail.com> | 2023-03-04 10:11:22 +0100 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2023-03-07 10:52:52 -0500 |
commit | e6307ca9fe8d6e63037fa22ec9a2200f7921537c (patch) | |
tree | 43e2037d0440870a8113ef3757fcdcae5bd3c728 | |
parent | b2178f49ecf7f7e4c9c7a5deb102086ea64ba41e (diff) | |
download | kutter-e6307ca9fe8d6e63037fa22ec9a2200f7921537c.tar.gz kutter-e6307ca9fe8d6e63037fa22ec9a2200f7921537c.tar.xz kutter-e6307ca9fe8d6e63037fa22ec9a2200f7921537c.zip |
tmc: Fix s2vs field formatters
Rename the field formatter text for tmc2208/tmc2209 and implement it also for tmc5160.
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
-rw-r--r-- | docs/TMC_Drivers.md | 2 | ||||
-rw-r--r-- | klippy/extras/tmc2208.py | 4 | ||||
-rw-r--r-- | klippy/extras/tmc5160.py | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/docs/TMC_Drivers.md b/docs/TMC_Drivers.md index b036b57e..d2a7eaa3 100644 --- a/docs/TMC_Drivers.md +++ b/docs/TMC_Drivers.md @@ -544,7 +544,7 @@ hot. Typical solutions are to decrease the stepper motor current, increase cooling on the stepper motor driver, and/or increase cooling on the stepper motor. -#### TMC reports error: `... ShortToGND` OR `LowSideShort` +#### TMC reports error: `... ShortToGND` OR `ShortToSupply` This indicates the driver has disabled itself because it detected very high current passing through the driver. This may indicate a loose or diff --git a/klippy/extras/tmc2208.py b/klippy/extras/tmc2208.py index 1b5968a9..1378c626 100644 --- a/klippy/extras/tmc2208.py +++ b/klippy/extras/tmc2208.py @@ -173,8 +173,8 @@ SignedFields = ["cur_a", "cur_b", "pwm_scale_auto"] FieldFormatters = dict(tmc2130.FieldFormatters) FieldFormatters.update({ "sel_a": (lambda v: "%d(%s)" % (v, ["TMC222x", "TMC220x"][v])), - "s2vsa": (lambda v: "1(LowSideShort_A!)" if v else ""), - "s2vsb": (lambda v: "1(LowSideShort_B!)" if v else ""), + "s2vsa": (lambda v: "1(ShortToSupply_A!)" if v else ""), + "s2vsb": (lambda v: "1(ShortToSupply_B!)" if v else ""), }) diff --git a/klippy/extras/tmc5160.py b/klippy/extras/tmc5160.py index 5d570958..f63d17ee 100644 --- a/klippy/extras/tmc5160.py +++ b/klippy/extras/tmc5160.py @@ -239,6 +239,10 @@ Fields["TSTEP"] = { SignedFields = ["cur_a", "cur_b", "sgt", "xactual", "vactual", "pwm_scale_auto"] FieldFormatters = dict(tmc2130.FieldFormatters) +FieldFormatters.update({ + "s2vsa": (lambda v: "1(ShortToSupply_A!)" if v else ""), + "s2vsb": (lambda v: "1(ShortToSupply_B!)" if v else ""), +}) ###################################################################### |