diff options
Diffstat (limited to 'kvmd/aiogp.py')
-rw-r--r-- | kvmd/aiogp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/aiogp.py b/kvmd/aiogp.py index ba406e8d..46252914 100644 --- a/kvmd/aiogp.py +++ b/kvmd/aiogp.py @@ -34,12 +34,12 @@ from . import aiotools # ===== -async def pulse(line: gpiod.Line, delay: float, final: float) -> None: +async def pulse(line: gpiod.Line, delay: float, final: float, inverted: bool=False) -> None: try: - line.set_value(1) + line.set_value(int(not inverted)) await asyncio.sleep(delay) finally: - line.set_value(0) + line.set_value(int(inverted)) await asyncio.sleep(final) |