Permalink
Browse files
fix 24bits to 32bits conversion, fix #37
- Loading branch information...
Showing
with
2 additions
and
2 deletions.
-
+1
−1
open_bci_ganglion.py
-
+1
−1
open_bci_v3.py
|
|
@@ -614,7 +614,7 @@ def conv24bitsToInt(unpacked): |
|
|
literal_read = struct.pack('3B', unpacked[0], unpacked[1], unpacked[2])
|
|
|
|
|
|
#3byte int in 2s compliment
|
|
|
- if (unpacked[0] >= 127):
|
|
|
+ if (unpacked[0] > 127):
|
|
|
pre_fix = bytes(bytearray.fromhex('FF'))
|
|
|
else:
|
|
|
pre_fix = bytes(bytearray.fromhex('00'))
|
|
|
|
|
|
@@ -244,7 +244,7 @@ def read(n): |
|
|
log_bytes_in = log_bytes_in + '|' + str(literal_read);
|
|
|
|
|
|
#3byte int in 2s compliment
|
|
|
- if (unpacked[0] >= 127):
|
|
|
+ if (unpacked[0] > 127):
|
|
|
pre_fix = bytes(bytearray.fromhex('FF'))
|
|
|
else:
|
|
|
pre_fix = bytes(bytearray.fromhex('00'))
|
|
|
|
0 comments on commit
c36abb5