diff options
author | Maxim Devaev <[email protected]> | 2023-06-01 17:35:16 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-07-10 03:02:28 +0300 |
commit | 2e6f0da14142e2f5c3bd548052fa9f189e2d00eb (patch) | |
tree | 39c0c7eb427224dfe9820cdd48bb51dbc8782a56 /kvmd/plugins | |
parent | 2730b1184012f74968c90b35687b679a0a15b747 (diff) |
ch9329: fixed int to byte conversion
Diffstat (limited to 'kvmd/plugins')
-rw-r--r-- | kvmd/plugins/hid/ch9329/chip.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/hid/ch9329/chip.py b/kvmd/plugins/hid/ch9329/chip.py index d883099b..e6524f10 100644 --- a/kvmd/plugins/hid/ch9329/chip.py +++ b/kvmd/plugins/hid/ch9329/chip.py @@ -44,8 +44,8 @@ class Chip: if len(cmd) == 0: cmd = b"\x00\x01\x00" cmd = b"\x57\xAB" + cmd - cmd += self.__make_checksum(cmd).to_bytes() - self.__tty.write(serial.to_bytes(cmd)) + cmd += self.__make_checksum(cmd).to_bytes(1, "big") + self.__tty.write(cmd) def __recv(self) -> int: data = self.__tty.read(5) |