klipper
klipper copied to clipboard
tmc2240: add current formatters
Run current, hold current and current range will be shown in Amperes. Each 2240 driver now has a separate instance of FieldFormatters, since the current formatters need to access a few fields in order to calculate the current.
Output sample:
// DRV_CONF: 00000001 current_range=1 (1.41A RMS)
// GLOBALSCALER: 0000007f globalscaler=127
// IHOLD_IRUN: 04061f1f ihold=31 (0.70A RMS) irun=31 (0.70A RMS) iholddelay=6 irundelay=4