diff --git a/utils.py b/utils.py index 3fd0ca1..b420dfd 100644 --- a/utils.py +++ b/utils.py @@ -48,3 +48,6 @@ def get_crc_16_CCITT(string): def switch_big_to_little_indian(string): return string[::-1] + +def hex_to_int(hex_value): + return int(hex_value.encode('hex'), 16)