mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 01:30:31 +08:00
ch9329: fixed int to byte conversion
This commit is contained in:
parent
2730b11840
commit
2e6f0da141
@ -44,8 +44,8 @@ class Chip:
|
|||||||
if len(cmd) == 0:
|
if len(cmd) == 0:
|
||||||
cmd = b"\x00\x01\x00"
|
cmd = b"\x00\x01\x00"
|
||||||
cmd = b"\x57\xAB" + cmd
|
cmd = b"\x57\xAB" + cmd
|
||||||
cmd += self.__make_checksum(cmd).to_bytes()
|
cmd += self.__make_checksum(cmd).to_bytes(1, "big")
|
||||||
self.__tty.write(serial.to_bytes(cmd))
|
self.__tty.write(cmd)
|
||||||
|
|
||||||
def __recv(self) -> int:
|
def __recv(self) -> int:
|
||||||
data = self.__tty.read(5)
|
data = self.__tty.read(5)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user