Skip to content

Commit

Permalink
decouple midi driver debug flag from juce
Browse files Browse the repository at this point in the history
  • Loading branch information
vsicurella committed Aug 15, 2024
1 parent 830d353 commit b5cb4bc
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#define MIDI_DRIVER_USE_LOCK JUCE_WINDOWS //|| JUCE_LINUX

#define MIDI_DRIVER_DEBUG 0 //JUCE_DEBUG

LumatoneFirmwareDriver::LumatoneFirmwareDriver(HostMode hostModeIn, int numBoardsIn)
: hostMode(hostModeIn)
, numBoards(numBoardsIn)
Expand Down Expand Up @@ -866,7 +868,7 @@ void LumatoneFirmwareDriver::sendCurrentMessage()
jassert(!isTimerRunning());
jassert(hasMsgWaitingForAck);

// #if JUCE_DEBUG
// #if MIDI_DRIVER_DEBUG
// if (currentMsgWaitingForAck.isSysEx())
// {
// auto sysExData = currentMsgWaitingForAck.getSysExData();
Expand All @@ -878,7 +880,7 @@ void LumatoneFirmwareDriver::sendCurrentMessage()
sendMessageNow(currentMsgWaitingForAck); // send it

// Notify listeners
#if JUCE_DEBUG
#if MIDI_DRIVER_DEBUG
{
juce::String msg = "SENT: " + FirmwareSupport::getCommandDescription(currentMsgWaitingForAck);
// DBG("SENT: " + currentMsgWaitingForAck.getDescription());
Expand All @@ -895,7 +897,7 @@ void LumatoneFirmwareDriver::sendCurrentMessage()

void LumatoneFirmwareDriver::handleIncomingMidiMessage(juce::MidiInput* source, const juce::MidiMessage& message)
{
#if JUCE_DEBUG
#if MIDI_DRIVER_DEBUG
if (message.isSysEx())
{
auto msg = "RCVD: " + FirmwareSupport::getCommandDescription(message);
Expand Down

0 comments on commit b5cb4bc

Please sign in to comment.