app/src/main/java/com/michael/bci/OpenBci.java
private static int interpret24bitAsInt32(byte[] byteArray) {
        int newInt = (
                ((0xFF & byteArray[0]) << 16) |
                ((0xFF & byteArray[1]) << 8) |
                 (0xFF & byteArray[2])
        );
        if ((newInt & 0x00800000) > 0) {
            newInt |= 0xFF000000;
        } else {
            newInt &= 0x00FFFFFF;
        }
        return newInt;
    }
/*
    EEG data values are transferring as a 24-bit signed integer which is the native format
    for the ADS1299 chip, processing code converts this into a standard 32-bit signed integer.
    this function is passed a 3 byte array
     */
EEG data values are transferring as a 24-bit signed integer which is the native format
for the ADS1299 chip, processing code converts this into a standard 32-bit signed integer.
this function is passed a 3 byte array
EEG data values are transferring as a 24 - bit signed integer which is the native format for the ADS1299 chip processing code converts this into a standard 32 - bit signed integer . this function is passed a 3 byte array
private static int interpret24bitAsInt32(byte[] byteArray) {
        int newInt = (
                ((0xFF & byteArray[0]) << 16) |
                ((0xFF & byteArray[1]) << 8) |
                 (0xFF & byteArray[2])
        );
        if ((newInt & 0x00800000) > 0) {
            newInt |= 0xFF000000;
        } else {
            newInt &= 0x00FFFFFF;
        }
        return newInt;
    }
private static int interpret24bitAsInt32 ( byte [ ] byteArray ) { int newInt = ( ( ( 0xFF & byteArray [ 0 ] ) << 16 ) | ( ( 0xFF & byteArray [ 1 ] ) << 8 ) | ( 0xFF & byteArray [ 2 ] ) ) ; if ( ( newInt & 0x00800000 ) > 0 ) { newInt |= 0xFF000000 ; } else { newInt &= 0x00FFFFFF ; } return newInt ; }
EEG data values are transferring as a 24-bit signed integer which is the native format
for the ADS1299 chip, processing code converts this into a standard 32-bit signed integer.
EEG data values are transferring as a 24 - bit signed integer which is the native format for the ADS1299 chip processing code converts this into a standard 32 - bit signed integer .