I added a "print" statement before line 164.
print "---->",b p = struct.pack(fmt, PACKET_FRAME, struct.calcsize(fmt), 0, PACKET_TYPE_COMMAND, command, 0, 0, operation, 0x0f, *b)
I got the following output :
----> (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36) # First call to function. At start-up ----> (0, 0, 0, 16, -6, 2, 16, -6, 2, 16, -6, 2, 36) # Second call to function. Negative numbers result in an error.
So the calibration paramaters are negative, and this gives and error.
struct.error: ubyte format requires 0 <= number <= 255
Regards
Peter
I added a "print" statement before line 164.
print "---->",b calcsize( fmt), 0, PACKET_ TYPE_COMMAND, command,
0, 0, operation, 0x0f, *b)
p = struct.pack(fmt, PACKET_FRAME, struct.
I got the following output :
----> (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36) # First call to function. At start-up
----> (0, 0, 0, 16, -6, 2, 16, -6, 2, 16, -6, 2, 36) # Second call to function. Negative numbers result in an error.
So the calibration paramaters are negative, and this gives and error.
struct.error: ubyte format requires 0 <= number <= 255
Regards
Peter