From a15f11ca412c533cf2012806359abc28e1f9a788 Mon Sep 17 00:00:00 2001 From: Tyson Date: Sun, 10 Feb 2019 18:47:13 +1100 Subject: [PATCH] Add debug statements --- src/AxeSystem.cpp | 14 +++++++++++++- src/AxeSystem.h | 4 ++++ src/AxeSystem_Handlers.cpp | 36 ++++++++++++++++++++++++------------ src/AxeSystem_Midi.cpp | 15 ++++----------- 4 files changed, 45 insertions(+), 24 deletions(-) diff --git a/src/AxeSystem.cpp b/src/AxeSystem.cpp index a04e4df..c53e417 100644 --- a/src/AxeSystem.cpp +++ b/src/AxeSystem.cpp @@ -71,4 +71,16 @@ void AxeSystem::intToMidiBytes(const int number, byte *byte1, byte *byte2) { int AxeSystem::midiBytesToInt(const byte lsb, const byte msb) { return lsb + (msb * BANK_SIZE); -} \ No newline at end of file +} + +#ifdef AXE_DEBUG_SYSEX +void AxeSystem::debugSysex(const byte *sysex, const byte length, const char *message) { + char buf[6]; + DEBUGGER.print(message); + for (byte i=0; i +#include "AxeSystem.h" #define SER_AVLB _serial->available() #define SER_READ _serial->read() @@ -98,6 +98,9 @@ void AxeSystem::sendSysEx(const byte *sysex, const byte length) { for (byte i=0; i AxeSystem::sendSysEx(): "); + #endif } void AxeSystem::sendCommand(const byte command) { @@ -135,16 +138,6 @@ void AxeSystem::sendCommand(const byte command, const byte *data, const byte par //punch it! sendSysEx(sysex, length); - #ifdef AXE_DEBUG_SYSEX - char buf[6]; - Serial.print("SYSEX OUT: "); - for (byte i=0; i