fixed 100 percent error
This commit is contained in:
parent
6369b4a3b4
commit
bed1d8f655
@ -158,7 +158,7 @@ class Interface_handler:
|
||||
raise ValueError(str("pin %s is not a part of device %s",pin,device_name))
|
||||
dutycycle = int(output[pin])
|
||||
self.pwm_dutycycles[self.Pin[pin].value] = dutycycle
|
||||
if not dutycycle in range(0,100,1):
|
||||
if not dutycycle in range(0,101,1):
|
||||
raise TypeError("value must be a whole number between 0 and 100")
|
||||
self.pwms[self.Pin[pin].value].stop()
|
||||
self.pwms[self.Pin[pin].value].start(dutycycle)
|
||||
|
Loading…
x
Reference in New Issue
Block a user