Permalink
Browse files

fix 24bits to 32bits conversion, fix #37

  • Loading branch information...
1 parent 5e4a60d commit c36abb54ad5ef9f145d98017d43fc7bf6ef344c6 @jfrey-xx jfrey-xx committed Apr 4, 2017
Showing with 2 additions and 2 deletions.
  1. +1 −1 open_bci_ganglion.py
  2. +1 −1 open_bci_v3.py
View
@@ -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'))
View
@@ -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

Please sign in to comment.