diff --git a/src/BLE-MIDI.h b/src/BLE-MIDI.h index 8c1519d..35d79b0 100755 --- a/src/BLE-MIDI.h +++ b/src/BLE-MIDI.h @@ -4,8 +4,6 @@ #pragma once -#include "utility/Logging.h" - #include using namespace MIDI_NAMESPACE; @@ -32,9 +30,7 @@ private: private: T mBleClass; -public: - const char* getTransportName() { return "BLE-MIDI"; }; - +public: BLEMIDI(const char* deviceName) { strncpy(mDeviceName, deviceName, 24); @@ -44,7 +40,7 @@ public: } protected: - void begin(MIDI_NAMESPACE::Channel inChannel = 1) + void begin() { mBleClass.begin(mDeviceName, this); @@ -92,17 +88,7 @@ protected: if (!succes) return mRxIndex; mRxBuffer[mRxIndex++] = byte; -/* - N_DEBUG_PRINT("available ("); - N_DEBUG_PRINT(mRxIndex); - N_DEBUG_PRINT(") :"); - for (size_t j = 0; j < mRxIndex; j++) { - N_DEBUG_PRINT("0x"); - N_DEBUG_PRINT(mRxBuffer[j], HEX); - N_DEBUG_PRINT(" "); - } - N_DEBUG_PRINTLN(); -*/ + return mRxIndex; } diff --git a/src/utility/Logging.h b/src/utility/Logging.h deleted file mode 100644 index 4f2ed3b..0000000 --- a/src/utility/Logging.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once - -#ifndef DEBUGSTREAM -#define DEBUGSTREAM Serial -#endif - -#define LOG_LEVEL_NONE 0 -#define LOG_LEVEL_FATAL 1 -#define LOG_LEVEL_ERROR 2 -#define LOG_LEVEL_WARNING 3 -#define LOG_LEVEL_NOTICE 4 -#define LOG_LEVEL_TRACE 5 -#define LOG_LEVEL_VERBOSE 6 - -#ifndef DEBUG -#define DEBUG LOG_LEVEL_NONE -#endif - -#if DEBUG > LOG_LEVEL_NONE -#define DEBUG_BEGIN(SPEED) \ - DEBUGSTREAM.begin(SPEED); \ - while (!DEBUGSTREAM) \ - ; \ - DEBUGSTREAM.println(F("Booting...")); -#define F_DEBUG_PRINT(...) DEBUGSTREAM.print(__VA_ARGS__) -#define F_DEBUG_PRINTLN(...) DEBUGSTREAM.println(__VA_ARGS__) -#else -#define DEBUG_BEGIN(SPEED) -#define F_DEBUG_PRINT(...) -#define F_DEBUG_PRINTLN(...) -#endif - -#if DEBUG >= LOG_LEVEL_ERROR -#define E_DEBUG_PRINT(...) DEBUGSTREAM.print(__VA_ARGS__) -#define E_DEBUG_PRINTLN(...) DEBUGSTREAM.println(__VA_ARGS__) -#else -#define E_DEBUG_PRINT(...) -#define E_DEBUG_PRINTLN(...) -#endif - -#if DEBUG >= LOG_LEVEL_WARNING -#define W_DEBUG_PRINT(...) DEBUGSTREAM.print(__VA_ARGS__) -#define W_DEBUG_PRINTLN(...) DEBUGSTREAM.println(__VA_ARGS__) -#else -#define W_DEBUG_PRINT(...) -#define W_DEBUG_PRINTLN(...) -#endif - -#if DEBUG >= LOG_LEVEL_NOTICE -#define N_DEBUG_PRINT(...) DEBUGSTREAM.print(__VA_ARGS__) -#define N_DEBUG_PRINTLN(...) DEBUGSTREAM.println(__VA_ARGS__) -#else -#define N_DEBUG_PRINT(...) -#define N_DEBUG_PRINTLN(...) -#endif - -#if DEBUG >= LOG_LEVEL_TRACE -#define T_DEBUG_PRINT(...) DEBUGSTREAM.print(__VA_ARGS__) -#define T_DEBUG_PRINTLN(...) DEBUGSTREAM.println(__VA_ARGS__) -#else -#define T_DEBUG_PRINT(...) -#define T_DEBUG_PRINTLN(...) -#endif - -#if DEBUG >= LOG_LEVEL_VERBOSE -#define V_DEBUG_PRINT(...) DEBUGSTREAM.print(__VA_ARGS__) -#define V_DEBUG_PRINTLN(...) DEBUGSTREAM.println(__VA_ARGS__) -#else -#define V_DEBUG_PRINT(...) -#define V_DEBUG_PRINTLN(...) -#endif