mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-01-28 20:01:21 -07:00
output_pin: Fix SET_PIN max_val check
The maxval should be self.scale. Reported by @mvturnho. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
a748cf39eb
commit
183e0decf8
1 changed files with 2 additions and 1 deletions
|
|
@ -41,7 +41,8 @@ class PrinterOutputPin:
|
|||
desc=self.cmd_SET_PIN_help)
|
||||
cmd_SET_PIN_help = "Set the value of an output pin"
|
||||
def cmd_SET_PIN(self, params):
|
||||
value = self.gcode.get_float('VALUE', params, minval=0., maxval=1.)
|
||||
value = self.gcode.get_float('VALUE', params,
|
||||
minval=0., maxval=self.scale)
|
||||
value /= self.scale
|
||||
if value == self.last_value:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue