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

Fix the way year is parsed from header

parent 977151a9
No related branches found
No related tags found
1 merge request!139Change the way RT130 data is read for better performance
...@@ -97,7 +97,7 @@ def get_rt130_packet_header(rt130_packet: bytes, ...@@ -97,7 +97,7 @@ def get_rt130_packet_header(rt130_packet: bytes,
raise RT130ParseError raise RT130ParseError
experiment_number = unpacker.unpack('b', rt130_packet[2:3])[0] 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 # A call to str.upper() is needed because bytes.hex() makes any
# hexadecimal letter (i.e. ABCDEF) lowercase, while we want them to be # hexadecimal letter (i.e. ABCDEF) lowercase, while we want them to be
# uppercase for display purpose. # 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