fix 24bits to 32bits conversion, fix #37
Esse commit está contido em:
@@ -614,7 +614,7 @@ def conv24bitsToInt(unpacked):
|
|||||||
literal_read = struct.pack('3B', unpacked[0], unpacked[1], unpacked[2])
|
literal_read = struct.pack('3B', unpacked[0], unpacked[1], unpacked[2])
|
||||||
|
|
||||||
#3byte int in 2s compliment
|
#3byte int in 2s compliment
|
||||||
if (unpacked[0] >= 127):
|
if (unpacked[0] > 127):
|
||||||
pre_fix = bytes(bytearray.fromhex('FF'))
|
pre_fix = bytes(bytearray.fromhex('FF'))
|
||||||
else:
|
else:
|
||||||
pre_fix = bytes(bytearray.fromhex('00'))
|
pre_fix = bytes(bytearray.fromhex('00'))
|
||||||
|
|||||||
+1
-1
@@ -244,7 +244,7 @@ class OpenBCIBoard(object):
|
|||||||
log_bytes_in = log_bytes_in + '|' + str(literal_read);
|
log_bytes_in = log_bytes_in + '|' + str(literal_read);
|
||||||
|
|
||||||
#3byte int in 2s compliment
|
#3byte int in 2s compliment
|
||||||
if (unpacked[0] >= 127):
|
if (unpacked[0] > 127):
|
||||||
pre_fix = bytes(bytearray.fromhex('FF'))
|
pre_fix = bytes(bytearray.fromhex('FF'))
|
||||||
else:
|
else:
|
||||||
pre_fix = bytes(bytearray.fromhex('00'))
|
pre_fix = bytes(bytearray.fromhex('00'))
|
||||||
|
|||||||
Referência em uma Nova Issue
Bloquear um usuário