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:
@ -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 = []
|
||||
|
Reference in New Issue
Block a user