mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 10:01:53 +08:00
refactoring
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
import os
|
||||
import asyncio
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from ...logging import get_logger
|
||||
|
||||
from ...inotify import InotifyMask
|
||||
@@ -52,14 +50,6 @@ class Plugin(BaseUserGpioDriver):
|
||||
self.__udc = udc
|
||||
self.__driver = ""
|
||||
|
||||
def register_input(self, pin: int, debounce: float) -> None:
|
||||
_ = pin
|
||||
_ = debounce
|
||||
|
||||
def register_output(self, pin: int, initial: Optional[bool]) -> None:
|
||||
_ = pin
|
||||
_ = initial
|
||||
|
||||
def prepare(self) -> None:
|
||||
(self.__udc, self.__driver) = usb.find_udc(self.__udc)
|
||||
get_logger().info("Using UDC %s", self.__udc)
|
||||
@@ -93,9 +83,6 @@ class Plugin(BaseUserGpioDriver):
|
||||
except Exception:
|
||||
logger.exception("Unexpected OTG-bind watcher error")
|
||||
|
||||
async def cleanup(self) -> None:
|
||||
pass
|
||||
|
||||
async def read(self, pin: int) -> bool:
|
||||
_ = pin
|
||||
return os.path.islink(self.__get_driver_path(self.__udc))
|
||||
|
||||
Reference in New Issue
Block a user