diff options
author | Devaev Maxim <[email protected]> | 2020-09-09 12:52:45 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-09 12:52:45 +0300 |
commit | 170ed92bd446a7dde3fedc2cb143d2a328f8a4cb (patch) | |
tree | a9b50ab83bffaa61066d657a7fc58f28df61cfda /kvmd/apps | |
parent | 04284584fecb279c5a1872d64697a3b26d04318c (diff) |
cleanup on driver side
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/ugpio.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/kvmd/apps/kvmd/ugpio.py b/kvmd/apps/kvmd/ugpio.py index c51b4c81..2cce6a51 100644 --- a/kvmd/apps/kvmd/ugpio.py +++ b/kvmd/apps/kvmd/ugpio.py @@ -117,7 +117,6 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes self.__channel = channel self.__pin: int = config.pin self.__inverted: bool = config.inverted - self.__initial: Optional[bool] = config.initial self.__switch: bool = config.switch @@ -160,13 +159,6 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes "busy": busy, } - def cleanup(self) -> None: - if self.__initial is not None: - try: - self.__driver.write(self.__pin, (self.__initial ^ self.__inverted)) - except Exception: - get_logger().exception("Can't cleanup %s", self) - async def switch(self, state: bool) -> bool: if not self.__switch: raise GpioSwitchNotSupported() @@ -278,8 +270,6 @@ class UserGpio: ]) async def cleanup(self) -> None: - for gout in self.__outputs.values(): - gout.cleanup() for driver in self.__drivers.values(): try: driver.cleanup() |