summaryrefslogtreecommitdiff
path: root/kvmd/plugins/ugpio/pwm.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-09-08 06:08:11 +0300
committerMaxim Devaev <[email protected]>2021-09-08 06:08:11 +0300
commitca812117e48cbc6e2c71947b912748cfd3ff9691 (patch)
treed8daa43c9e606ed0c4226a112e943aa683fd627f /kvmd/plugins/ugpio/pwm.py
parent5d1228eb9e5b159d0909453ed85280b9fb794a9e (diff)
improved pins validation
Diffstat (limited to 'kvmd/plugins/ugpio/pwm.py')
-rw-r--r--kvmd/plugins/ugpio/pwm.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/ugpio/pwm.py b/kvmd/plugins/ugpio/pwm.py
index 2bd8807e..642a3f68 100644
--- a/kvmd/plugins/ugpio/pwm.py
+++ b/kvmd/plugins/ugpio/pwm.py
@@ -81,8 +81,8 @@ class Plugin(BaseUserGpioDriver):
return set([UserGpioModes.OUTPUT])
@classmethod
- def get_pin_validator(cls) -> Callable[[Any], str]:
- return (lambda arg: str(valid_gpio_pin(arg)))
+ def get_pin_validator(cls) -> Callable[[Any], Any]:
+ return valid_gpio_pin
def register_output(self, pin: str, initial: Optional[bool]) -> None:
self.__channels[int(pin)] = initial