From 2396e87b701009c57e21ecbe07696275716c5df5 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Mon, 24 Jan 2022 19:09:30 +0300 Subject: refactoring --- kvmd/plugins/ugpio/pway.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'kvmd/plugins/ugpio') diff --git a/kvmd/plugins/ugpio/pway.py b/kvmd/plugins/ugpio/pway.py index 3bd2a268..aeff27e3 100644 --- a/kvmd/plugins/ugpio/pway.py +++ b/kvmd/plugins/ugpio/pway.py @@ -1,6 +1,6 @@ # ========================================================================== # # # -# KVMD - The main Pi-KVM daemon. # +# KVMD - The main PiKVM daemon. # # # # Copyright (C) 2018-2022 Maxim Devaev # # # @@ -182,14 +182,12 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute # Set a channel by sending PS [1-16] # Note that the recv is 0-based index, while send is 1-based. We add 1 to the "channel" to # normalize for the 1-based index on send - cmd = (b"PS") - tty.write(b"%s %d\r" % (cmd, channel + 1)) + tty.write(b"PS %d\r" % (channel + 1)) tty.flush() def __reset(self, tty: serial.Serial) -> None: # Reset by sending PS without port number - cmd = (b"PS") - tty.write(b"%s\r" % (cmd)) + tty.write(b"PS\r") tty.flush() def __str__(self) -> str: -- cgit v1.2.3