More SysEx issues.
BenZonneveld opened this issue · 1 comments
Context
Board Info:
- Custom ATMega1284p board
- Uses Serial1 for MIDI communication, no other relevant hardware for this specific issue.
- Arduino IDE
1.8.13
- How are you using MIDI ?
- Hardware Serial (DIN plugs)
- USB
- Other (please specify)
- Is your problem related to:
- MIDI Input (reading messages from other devices)
- MIDI Output (sending messages to other devices)
- How comfortable are you with code ?
- Complete beginner
- I've done basic projects
- I know my way around C/C++
- Advanced / professional
Describe your project and what you expect to happen:
My project needs to receive a maximum of 2100 bytes of sysex data.
Describe your problem (what does not work):
Changing the SysExMaxSize following instructions and using the MIDI_CREATE_CUSTOM_INSTANCE macro does not work.
Also, the Settings need the midi BaudRate.
The attached code works when bypassing the macro.
Steps to reproduce
struct MySettings : public midi::DefaultSettings
{
static const long BaudRate = 31250;
static const unsigned SysExMaxSize = 2100; // Accept SysEx messages up to 1024 bytes long.
static const bool UseRunningStatus = true;
};
//MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial1, MIDI, MySettings); // This does NOT change the Sysex Settings !!!
midi::SerialMIDI Serial1MIDI(Serial1);
midi::MidiInterface<midi::SerialMIDI, MySettings> MIDI((midi::SerialMIDI&)Serial1MIDI);