fix: Use SysEx size in Settings

This commit is contained in:
Francois Best 2020-04-17 08:15:42 +02:00
parent 7a96fec0b5
commit a9664ef4a4
1 changed files with 5 additions and 5 deletions

View File

@ -1005,15 +1005,15 @@ bool MidiInterface<Transport, Settings, Platform>::parse()
if ((mPendingMessage[0] == SystemExclusiveStart) if ((mPendingMessage[0] == SystemExclusiveStart)
|| (mPendingMessage[0] == SystemExclusiveEnd)) || (mPendingMessage[0] == SystemExclusiveEnd))
{ {
auto lastByte = mMessage.sysexArray[DefaultSettings::SysExMaxSize - 1]; auto lastByte = mMessage.sysexArray[Settings::SysExMaxSize - 1];
mMessage.sysexArray[DefaultSettings::SysExMaxSize - 1] = SystemExclusiveStart; mMessage.sysexArray[Settings::SysExMaxSize - 1] = SystemExclusiveStart;
mMessage.type = SystemExclusive; mMessage.type = SystemExclusive;
// Get length // Get length
mMessage.data1 = DefaultSettings::SysExMaxSize & 0xff; // LSB mMessage.data1 = Settings::SysExMaxSize & 0xff; // LSB
mMessage.data2 = byte(DefaultSettings::SysExMaxSize >> 8); // MSB mMessage.data2 = byte(Settings::SysExMaxSize >> 8); // MSB
mMessage.channel = 0; mMessage.channel = 0;
mMessage.length = DefaultSettings::SysExMaxSize; mMessage.length = Settings::SysExMaxSize;
mMessage.valid = true; mMessage.valid = true;
// No need to check against the inputChannel, // No need to check against the inputChannel,