Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: PinDetect USBDevice_STM32F103 mbed-STM32F103C8T6
Diff: midiswitch.cpp
- Revision:
- 9:d5fa853818dd
- Parent:
- 8:75c5ec68765e
- Child:
- 11:ff22140b5119
--- a/midiswitch.cpp Fri Aug 04 05:22:22 2017 +0200
+++ b/midiswitch.cpp Fri Aug 04 05:55:36 2017 +0200
@@ -48,13 +48,13 @@
case 0x90: // Note on
msg.data[1] = msg.data[1] | (cfg.channel & 0x0F);
msg.data[3] = value;
- msg.data[2] = cfg.data1;
+ msg.data[2] = cfg.data1 & 0x0F;
break;
case 0xA0: // Poly pressure
case 0xB0: // Control change
case 0xE0: // PitchBend
msg.data[1] = msg.data[1] | (cfg.channel & 0x0F);
- msg.data[2] = cfg.data1;
+ msg.data[2] = cfg.data1 & 0x0F;
msg.data[3] = value;
break;
default: