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:
Kevin O'Connor 2018-06-05 09:12:31 -04:00
parent a748cf39eb
commit 183e0decf8
1 changed files with 2 additions and 1 deletions

View File

@ -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