Added new feature msgPrintControl from sinqMotor 0.8.0.

Correspondingly, the minimum version requirement for sinqMotor has been bumped to 0.8.0.
This commit is contained in:
2025-03-04 12:41:20 +01:00
parent cb91a8aa36
commit 4ad842c097
8 changed files with 299 additions and 408 deletions

View File

@ -2,9 +2,14 @@
Code shared by "decodeError.py" and "decodeStatus.py"
"""
import struct
def decode(value: int, interpretation):
bit_list = [int(char) for char in bin(value)[2:]]
# Pack the input as a short and unpack it as an unsigned short
value_uint16 = format(value, '016b') # Format as 16-bit unsigned integer
bit_list = [int(char) for char in value_uint16]
bit_list.reverse()
interpreted = []