13
0

MCP: fix 2-char display message to avoid running status issues with JACK MIDI

git-svn-id: svn://localhost/ardour2/branches/3.0@11866 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-04-10 15:21:56 +00:00
parent 43a6662357
commit fcff349ba5

View File

@ -186,11 +186,11 @@ MidiByteArray MackieMidiBuilder::two_char_display (const std::string & msg, cons
if (msg.length() != 2) throw MackieControlException ("MackieMidiBuilder::two_char_display: msg must be exactly 2 characters");
if (dots.length() != 2) throw MackieControlException ("MackieMidiBuilder::two_char_display: dots must be exactly 2 characters");
MidiByteArray bytes (5, 0xb0, 0x4a, 0x00, 0x4b, 0x00);
MidiByteArray bytes (6, 0xb0, 0x4a, 0x00, 0xb0, 0x4b, 0x00);
// chars are understood by the surface in right-to-left order
// could also exchange the 0x4a and 0x4b, above
bytes[4] = translate_seven_segment (msg[0]) + (dots[0] == '.' ? 0x40 : 0x00);
bytes[5] = translate_seven_segment (msg[0]) + (dots[0] == '.' ? 0x40 : 0x00);
bytes[2] = translate_seven_segment (msg[1]) + (dots[1] == '.' ? 0x40 : 0x00);
return bytes;