summaryrefslogtreecommitdiff
path: root/kvmd/plugins/atx
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-10-03 03:34:55 +0300
committerDevaev Maxim <[email protected]>2020-10-03 05:02:14 +0300
commitcccf44655aadc80d2d535033951e7af9ac65a271 (patch)
tree1ea9607e91e0189a0d73e87bed39b14c29213585 /kvmd/plugins/atx
parent872145590a3227b799ae7f5e7731dfc15967d63c (diff)
common env variables
Diffstat (limited to 'kvmd/plugins/atx')
-rw-r--r--kvmd/plugins/atx/gpio.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kvmd/plugins/atx/gpio.py b/kvmd/plugins/atx/gpio.py
index 52a52151..b1d6d5d9 100644
--- a/kvmd/plugins/atx/gpio.py
+++ b/kvmd/plugins/atx/gpio.py
@@ -28,6 +28,7 @@ import gpiod
from ...logging import get_logger
+from ... import env
from ... import aiotools
from ... import aiogp
@@ -76,7 +77,7 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes
self.__reset_switch_line: Optional[gpiod.Line] = None
self.__reader = aiogp.AioReader(
- path=aiogp.DEVICE_PATH,
+ path=env.GPIO_DEVICE_PATH,
consumer="kvmd::atx-gpio::leds",
pins={
power_led_pin: aiogp.AioReaderPinParams(power_led_inverted, power_led_debounce),
@@ -107,7 +108,7 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes
assert self.__power_switch_line is None
assert self.__reset_switch_line is None
- self.__chip = gpiod.Chip(aiogp.DEVICE_PATH)
+ self.__chip = gpiod.Chip(env.GPIO_DEVICE_PATH)
self.__power_switch_line = self.__chip.get_line(self.__power_switch_pin)
self.__power_switch_line.request("kvmd::atx-gpio::power_switch", gpiod.LINE_REQ_DIR_OUT, default_vals=[0])