forked from bracci/QlockWiFive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDebug.h
37 lines (31 loc) · 850 Bytes
/
Debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/******************************************************************************
Debug.h
******************************************************************************/
#ifndef DEBUG_H
#define DEBUG_H
#include <Arduino.h>
#include <TimeLib.h>
#ifdef DEBUG
#define DEBUG_PRINT(x) Serial.print(x)
//#define DEBUG_PRINT2(x, y) Serial.print(x, y)
#define DEBUG_PRINTLN(x) Serial.println(x)
//#define DEBUG_PRINTLN2(x, y) Serial.println(x, y)
#define DEBUG_FLUSH() Serial.flush()
#else
#define DEBUG_PRINT(x)
#define DEBUG_PRINT2(x, y)
#define DEBUG_PRINTLN(x)
#define DEBUG_PRINTLN2(x, y)
#define DEBUG_FLUSH()
#endif
class Debug {
public:
Debug();
void debugScreenBuffer(word ScreenBuffer[]);
void debugTime(String label, time_t time);
void debugFps();
private:
uint16_t frames = 0;
uint32_t lastFpsCheck = 0;
};
#endif