Skip to content

Commit b5a9ced

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 664e0f6 commit b5a9ced

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

hart_protocol/__version__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import subprocess
55
from .VERSION import __version__
66

7-
87
here = pathlib.Path(__file__).resolve().parent
98

109

hart_protocol/_unpacker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __next__(self):
6161
while len(self.buf) < 3:
6262
self.buf += self._read_one_byte_if_possible()
6363
# keep reading until we find a minimum preamble
64-
while self.buf[:3] not in [b"\xFF\xFF\x06", b"\xFF\xFF\x86"]:
64+
while self.buf[:3] not in [b"\xff\xff\x06", b"\xff\xff\x86"]:
6565
self.buf += self._read_one_byte_if_possible()
6666
self.buf = self.buf[1:]
6767
self._decoding_error("Head of buffer not recognized as valid preamble")

hart_protocol/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def pack_command(address, command_id, data=None):
2424
address = int.from_bytes(address, "big")
2525
if type(command_id) == int:
2626
command_id = command_id.to_bytes(1, "big")
27-
command = b"\xFF\xFF\xFF\xFF\xFF" # preamble
27+
command = b"\xff\xff\xff\xff\xff" # preamble
2828
command += b"\x82" # start charachter
2929
command += (549755813888 | address).to_bytes(5, "big")
3030
command += command_id

0 commit comments

Comments
 (0)