Implemented first Hangar-Service

Dependencies:   CalibrateMagneto QuaternionMath

Fork of SML2 by TobyRich GmbH

Committer:
pvaibhav
Date:
Wed Jan 14 15:44:34 2015 +0000
Revision:
1:c279bc3af90c
Parent:
0:943820483318
Child:
3:ee90a9ada112
Barometer and accelerometer are alive

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pvaibhav 0:943820483318 1 #ifndef _H_LOGGER_H
pvaibhav 0:943820483318 2 #define _H_LOGGER_H
pvaibhav 0:943820483318 3
pvaibhav 0:943820483318 4 #include <cstdio>
pvaibhav 0:943820483318 5 #ifdef DEBUG
pvaibhav 0:943820483318 6 static Serial sml2uart(p26, p24);
pvaibhav 1:c279bc3af90c 7 #define LOG(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[39m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
pvaibhav 1:c279bc3af90c 8 #define WARN(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[33m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
pvaibhav 1:c279bc3af90c 9 #define ERR(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[31m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
pvaibhav 1:c279bc3af90c 10 #define INFO(x, ...) { sml2uart.printf("\x1b[34m%12.12s: \x1b[32m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
pvaibhav 0:943820483318 11 #else
pvaibhav 0:943820483318 12 #define LOG(x, ...)
pvaibhav 0:943820483318 13 #define WARN(x, ...)
pvaibhav 0:943820483318 14 #define ERR(x, ...)
pvaibhav 0:943820483318 15 #define INFO(x, ...)
pvaibhav 0:943820483318 16 #endif
pvaibhav 0:943820483318 17
pvaibhav 0:943820483318 18 #endif//_H_LOGGER_H