mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
fix
This commit is contained in:
parent
9cee98310d
commit
9e60f24c54
@ -320,7 +320,6 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst
|
|||||||
if not self.__noop:
|
if not self.__noop:
|
||||||
if tty.in_waiting:
|
if tty.in_waiting:
|
||||||
tty.read(tty.in_waiting)
|
tty.read(tty.in_waiting)
|
||||||
|
|
||||||
assert tty.write(request) == len(request)
|
assert tty.write(request) == len(request)
|
||||||
response = tty.read(4)
|
response = tty.read(4)
|
||||||
else:
|
else:
|
||||||
@ -333,7 +332,7 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst
|
|||||||
else:
|
else:
|
||||||
assert len(response) == 4, response
|
assert len(response) == 4, response
|
||||||
if self.__make_crc16(response[-4:-2]) != struct.unpack(">H", response[-2:])[0]:
|
if self.__make_crc16(response[-4:-2]) != struct.unpack(">H", response[-2:])[0]:
|
||||||
get_logger().error("Invalid response CRC; requesting response again ...")
|
logger.error("Invalid response CRC; requesting response again ...")
|
||||||
request = self.__make_request(b"\x02\x00\x00\x00\x00") # Repeat an answer
|
request = self.__make_request(b"\x02\x00\x00\x00\x00") # Repeat an answer
|
||||||
else:
|
else:
|
||||||
code = response[1]
|
code = response[1]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user