12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
-
-
- #ifndef _DEBUG_LOG_H_
- #define _DEBUG_LOG_H_
-
- #include <Arduino.h>
-
- #ifdef PLATFORM_ESP
- #include <CircularBuffer.h>
- #define DEBUG_LOG_HISTORY_SIZE 1024
- #endif
-
- class DebugLog {
- public:
- #ifdef PLATFORM_ESP
- String getBuffer(void);
- #endif
-
- void print(String s);
- void print(int n);
-
- void println(void);
- void println(String s);
- void println(int n);
-
- private:
- void sendToTargets(String s);
-
- #ifdef PLATFORM_ESP
- void addToBuffer(String s);
-
- CircularBuffer<char, DEBUG_LOG_HISTORY_SIZE> buffer;
- #endif
- };
-
- extern DebugLog debug;
-
- #endif
|