DIY fertilizer mixer and plant watering machine https://www.xythobuz.de/giessomat.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DebugLog.h 649B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _DEBUG_LOG_H_
  2. #define _DEBUG_LOG_H_
  3. #include <Arduino.h>
  4. #ifdef PLATFORM_ESP
  5. #include <CircularBuffer.h>
  6. #define DEBUG_LOG_HISTORY_SIZE 1024
  7. #endif // PLATFORM_ESP
  8. class DebugLog {
  9. public:
  10. #ifdef PLATFORM_ESP
  11. String getBuffer(void);
  12. #endif // PLATFORM_ESP
  13. void print(String s);
  14. void print(int n);
  15. void println(void);
  16. void println(String s);
  17. void println(int n);
  18. private:
  19. void sendToTargets(String s);
  20. #ifdef PLATFORM_ESP
  21. void addToBuffer(String s);
  22. CircularBuffer<char, DEBUG_LOG_HISTORY_SIZE> buffer;
  23. #endif // PLATFORM_ESP
  24. };
  25. extern DebugLog debug;
  26. #endif // _DEBUG_LOG_H_