mcp4018: Add SET_DIGIPOT command to mcp4018 implementation (#5737)

Added a SET_DIGIPOT command to the mcp4018 implementation.
Previously the mcp4018 was read only, and set at the time of
configuration.  This allows you to change the value during a
print, which is needed for some older printers that need to
lower the stepper current during preheating.

Signed-off-by: Jake Bordens <jake@allaboutjake.com>
This commit is contained in:
jake-b 2022-09-02 11:30:06 -03:00 committed by GitHub
parent 354915d2ad
commit ae6c16422f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 1 deletions

View file

@ -746,6 +746,20 @@ scheduled to run after the stepper move completes, however if a manual
stepper move uses SYNC=0 then future G-Code movement commands may run
in parallel with the stepper movement.
### [mcp4018]
The following command is available when a
[mcp4018 config section](Config_Reference.md#mcp4018) is
enabled.
#### SET_DIGIPOT
`SET_DIGIPOT DIGIPOT=config_name WIPER=<value>`: This command will
change the current value of the digipot. This value should typically
be between 0.0 and 1.0, unless a 'scale' is defined in the config.
When 'scale' is defined, then this value should be between 0.0 and
'scale'.
### [led]
The following command is available when any of the