Implemented first Hangar-Service
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
Diff: Logger.h
- Revision:
- 1:c279bc3af90c
- Parent:
- 0:943820483318
- Child:
- 3:ee90a9ada112
--- a/Logger.h Tue Jan 13 11:23:01 2015 +0000 +++ b/Logger.h Wed Jan 14 15:44:34 2015 +0000 @@ -4,10 +4,10 @@ #include <cstdio> #ifdef DEBUG static Serial sml2uart(p26, p24); -#define LOG(x, ...) { sml2uart.printf("[ %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); } -#define WARN(x, ...) { sml2uart.printf("[W %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); } -#define ERR(x, ...) { sml2uart.printf("[E %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); } -#define INFO(x, ...) { sml2uart.printf("[i %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); fflush(stdout); } +#define LOG(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[39m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } +#define WARN(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[33m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } +#define ERR(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[31m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } +#define INFO(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[32m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } #else #define LOG(x, ...) #define WARN(x, ...)