mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
common gpio path variable
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
# ========================================================================== #
|
||||
|
||||
|
||||
import os
|
||||
import asyncio
|
||||
import threading
|
||||
|
||||
@@ -31,6 +32,12 @@ import gpiod
|
||||
from . import aiotools
|
||||
|
||||
|
||||
# =====
|
||||
# XXX: Do not use this variable for any purpose other than testing.
|
||||
# It can be removed at any time.
|
||||
DEVICE_PATH = os.getenv("KVMD_GPIO_DEVICE_PATH", "/dev/gpiochip0")
|
||||
|
||||
|
||||
# =====
|
||||
async def pulse(line: gpiod.Line, delay: float, final: float) -> None:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user