fixed 100 percent error

This commit is contained in:
p.loedige 2021-01-06 16:15:49 +01:00
parent 6369b4a3b4
commit bed1d8f655

View File

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