changed conditional in checkMidi() to bitmask

This commit is contained in:
Jakob Bak 2012-08-25 20:23:28 +02:00
parent 2c493f7dec
commit 0ec9332d97
2 changed files with 1 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -49,7 +49,7 @@ void MMidi::checkMidi()
while(Serial.available() > 0) { while(Serial.available() > 0) {
data = Serial.read(); data = Serial.read();
if(data > 127) { // bitmask with 10000000 to see if byte is over 127 | data & 0x80 if(data & 0x80) { // bitmask with 10000000 to see if byte is over 127 | data & 0x80
midiBufferIndex = 0; midiBufferIndex = 0;
} }
midiBuffer[midiBufferIndex] = data; midiBuffer[midiBufferIndex] = data;