mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
refactoring
This commit is contained in:
parent
2396e87b70
commit
41d1471cd9
@ -180,8 +180,8 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
|
|||||||
|
|
||||||
def __send_channel(self, tty: serial.Serial, channel: int) -> None:
|
def __send_channel(self, tty: serial.Serial, channel: int) -> None:
|
||||||
# Set a channel by sending PS [1-16]
|
# 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
|
# Note that the recv is 0-based index, while send is 1-based
|
||||||
# normalize for the 1-based index on send
|
# We add 1 to the "channel" to normalize for the 1-based index on send
|
||||||
tty.write(b"PS %d\r" % (channel + 1))
|
tty.write(b"PS %d\r" % (channel + 1))
|
||||||
tty.flush()
|
tty.flush()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user