@@ -36,7 +36,7 @@ inline MidiInterface<SerialPort, Settings>::MidiInterface(SerialPort& inSerial)
3636 , mInputChannel (0 )
3737 , mRunningStatus_RX (InvalidType)
3838 , mRunningStatus_TX (InvalidType)
39- , mPendingMessageExpectedLenght (0 )
39+ , mPendingMessageExpectedLength (0 )
4040 , mPendingMessageIndex (0 )
4141 , mCurrentRpnNumber (0xffff )
4242 , mCurrentNrpnNumber (0xffff )
@@ -95,7 +95,7 @@ void MidiInterface<SerialPort, Settings>::begin(Channel inChannel)
9595 mRunningStatus_RX = InvalidType;
9696
9797 mPendingMessageIndex = 0 ;
98- mPendingMessageExpectedLenght = 0 ;
98+ mPendingMessageExpectedLength = 0 ;
9999
100100 mCurrentRpnNumber = 0xffff ;
101101 mCurrentNrpnNumber = 0xffff ;
@@ -746,7 +746,7 @@ bool MidiInterface<SerialPort, Settings>::parse()
746746 // Do not reset all input attributes, Running Status must remain unchanged.
747747 // We still need to reset these
748748 mPendingMessageIndex = 0 ;
749- mPendingMessageExpectedLenght = 0 ;
749+ mPendingMessageExpectedLength = 0 ;
750750
751751 return true ;
752752 break ;
@@ -756,7 +756,7 @@ bool MidiInterface<SerialPort, Settings>::parse()
756756 case AfterTouchChannel:
757757 case TimeCodeQuarterFrame:
758758 case SongSelect:
759- mPendingMessageExpectedLenght = 2 ;
759+ mPendingMessageExpectedLength = 2 ;
760760 break ;
761761
762762 // 3 bytes messages
@@ -766,13 +766,13 @@ bool MidiInterface<SerialPort, Settings>::parse()
766766 case PitchBend:
767767 case AfterTouchPoly:
768768 case SongPosition:
769- mPendingMessageExpectedLenght = 3 ;
769+ mPendingMessageExpectedLength = 3 ;
770770 break ;
771771
772772 case SystemExclusive:
773- // The message can be any lenght
773+ // The message can be any length
774774 // between 3 and MidiMessage::sSysExMaxSize bytes
775- mPendingMessageExpectedLenght = MidiMessage::sSysExMaxSize ;
775+ mPendingMessageExpectedLength = MidiMessage::sSysExMaxSize ;
776776 mRunningStatus_RX = InvalidType;
777777 mMessage .sysexArray [0 ] = SystemExclusive;
778778 break ;
@@ -785,7 +785,7 @@ bool MidiInterface<SerialPort, Settings>::parse()
785785 break ;
786786 }
787787
788- if (mPendingMessageIndex >= (mPendingMessageExpectedLenght - 1 ))
788+ if (mPendingMessageIndex >= (mPendingMessageExpectedLength - 1 ))
789789 {
790790 // Reception complete
791791 mMessage .type = getTypeFromStatusByte (mPendingMessage [0 ]);
@@ -794,7 +794,7 @@ bool MidiInterface<SerialPort, Settings>::parse()
794794 mMessage .data2 = 0 ; // Completed new message has 1 data byte
795795
796796 mPendingMessageIndex = 0 ;
797- mPendingMessageExpectedLenght = 0 ;
797+ mPendingMessageExpectedLength = 0 ;
798798 mMessage .valid = true ;
799799 return true ;
800800 }
@@ -882,7 +882,7 @@ bool MidiInterface<SerialPort, Settings>::parse()
882882 mPendingMessage [mPendingMessageIndex ] = extracted;
883883
884884 // Now we are going to check if we have reached the end of the message
885- if (mPendingMessageIndex >= (mPendingMessageExpectedLenght - 1 ))
885+ if (mPendingMessageIndex >= (mPendingMessageExpectedLength - 1 ))
886886 {
887887 // "FML" case: fall down here with an overflown SysEx..
888888 // This means we received the last possible data byte that can fit
@@ -903,11 +903,11 @@ bool MidiInterface<SerialPort, Settings>::parse()
903903 mMessage .data1 = mPendingMessage [1 ];
904904
905905 // Save data2 only if applicable
906- mMessage .data2 = mPendingMessageExpectedLenght == 3 ? mPendingMessage [2 ] : 0 ;
906+ mMessage .data2 = mPendingMessageExpectedLength == 3 ? mPendingMessage [2 ] : 0 ;
907907
908908 // Reset local variables
909909 mPendingMessageIndex = 0 ;
910- mPendingMessageExpectedLenght = 0 ;
910+ mPendingMessageExpectedLength = 0 ;
911911
912912 mMessage .valid = true ;
913913
@@ -996,7 +996,7 @@ template<class SerialPort, class Settings>
996996inline void MidiInterface<SerialPort, Settings>::resetInput()
997997{
998998 mPendingMessageIndex = 0 ;
999- mPendingMessageExpectedLenght = 0 ;
999+ mPendingMessageExpectedLength = 0 ;
10001000 mRunningStatus_RX = InvalidType;
10011001}
10021002
@@ -1047,7 +1047,7 @@ inline const byte* MidiInterface<SerialPort, Settings>::getSysExArray() const
10471047 return mMessage .sysexArray ;
10481048}
10491049
1050- /* ! \brief Get the lenght of the System Exclusive array.
1050+ /* ! \brief Get the length of the System Exclusive array.
10511051
10521052 It is coded using data1 as LSB and data2 as MSB.
10531053 \return The array's length, in bytes.
0 commit comments