mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
improved pins validation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user