mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
refactoring
This commit is contained in:
parent
b9c47126ab
commit
88fae53541
@ -19,6 +19,7 @@
|
|||||||
# #
|
# #
|
||||||
# ========================================================================== #
|
# ========================================================================== #
|
||||||
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import functools
|
import functools
|
||||||
@ -177,10 +178,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:
|
||||||
assert 0 <= channel <= 3
|
assert 0 <= channel <= 3
|
||||||
cmd = b"%d!\n" % (
|
cmd = b"%d!\n" % (channel + 1)
|
||||||
channel + 1,
|
tty.write(cmd)
|
||||||
)
|
|
||||||
tty.write(cmd) # Twice because of ezcoo bugs
|
|
||||||
tty.flush()
|
tty.flush()
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user