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>
This commit is contained in:
parent
b2178f49ec
commit
e6307ca9fe
|
@ -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
|
||||
|
|
|
@ -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 ""),
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -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 ""),
|
||||
})
|
||||
|
||||
|
||||
######################################################################
|
||||
|
|
Loading…
Reference in New Issue