Skip to content
Snippets Groups Projects
Commit 87693a4b authored by Kien Le's avatar Kien Le
Browse files

Fix the way year is parsed from header

parent 2a2271d5
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ def get_rt130_packet_header(rt130_packet: bytes,
raise RT130ParseError
experiment_number = unpacker.unpack('b', rt130_packet[2:3])[0]
year = unpacker.unpack('b', rt130_packet[3:4])[0]
year = int(rt130_packet[3:4].hex())
# A call to str.upper() is needed because bytes.hex() makes any
# hexadecimal letter (i.e. ABCDEF) lowercase, while we want them to be
# uppercase for display purpose.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment