summaryrefslogtreecommitdiff
path: root/kvmd/plugins/hid/bt/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/plugins/hid/bt/__init__.py')
-rw-r--r--kvmd/plugins/hid/bt/__init__.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/kvmd/plugins/hid/bt/__init__.py b/kvmd/plugins/hid/bt/__init__.py
index d8065c92..1b50f26a 100644
--- a/kvmd/plugins/hid/bt/__init__.py
+++ b/kvmd/plugins/hid/bt/__init__.py
@@ -25,6 +25,7 @@ import time
from typing import Iterable
from typing import AsyncGenerator
+from typing import Any
from ....logging import get_logger
@@ -61,6 +62,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
def __init__( # pylint: disable=too-many-arguments,too-many-locals
self,
+
manufacturer: str,
product: str,
description: str,
@@ -76,9 +78,11 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
max_clients: int,
socket_timeout: float,
select_timeout: float,
+
+ jiggler: dict[str, Any],
) -> None:
- super().__init__()
+ super().__init__(**jiggler)
self._set_jiggler_absolute(False)
self.__proc: (multiprocessing.Process | None) = None
@@ -121,6 +125,8 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
"max_clients": Option(1, type=valid_int_f1),
"socket_timeout": Option(5.0, type=valid_float_f01),
"select_timeout": Option(1.0, type=valid_float_f01),
+
+ **cls._get_jiggler_options(),
}
def sysprep(self) -> None:
@@ -149,7 +155,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
"absolute": False,
"outputs": outputs,
},
- "jiggler": self._get_jiggler_state(),
+ **self._get_jiggler_state(),
}
async def poll_state(self) -> AsyncGenerator[dict, None]:
@@ -207,7 +213,7 @@ class Plugin(BaseHid): # pylint: disable=too-many-instance-attributes
_ = keyboard_output
_ = mouse_output
if jiggler is not None:
- self._set_jiggler_enabled(jiggler)
+ self._set_jiggler_active(jiggler)
self.__notifier.notify()
# =====