Implemented first Hangar-Service

Dependencies:   CalibrateMagneto QuaternionMath

Fork of SML2 by TobyRich GmbH

Revision:
3:ee90a9ada112
Parent:
1:c279bc3af90c
Child:
7:604a8369b801
--- a/Logger.h	Wed Jan 14 17:57:11 2015 +0000
+++ b/Logger.h	Wed Jan 21 10:34:45 2015 +0000
@@ -1,18 +1,28 @@
 #ifndef _H_LOGGER_H
 #define _H_LOGGER_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <cstdio>
 #ifdef DEBUG
-static Serial sml2uart(p26, p24);
-#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); }
+//static Serial sml2uart(p26, p24);
+#define LOG(x, ...)  { printf("\x1b[34m%12.12s: \x1b[39m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
+#define WARN(x, ...) { printf("\x1b[34m%12.12s: \x1b[33m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
+#define ERR(x, ...)  { printf("\x1b[34m%12.12s: \x1b[31m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
+#define INFO(x, ...) { printf("\x1b[34m%12.12s: \x1b[32m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); }
+#define DATA(x, ...) { printf("DATA: "x"\r\n", ##__VA_ARGS__); fflush(stdout); }
 #else
 #define LOG(x, ...)
 #define WARN(x, ...)
 #define ERR(x, ...)
 #define INFO(x, ...)
+#define DATA(x, ...)
+#endif
+
+#ifdef __cplusplus
+}
 #endif
 
 #endif//_H_LOGGER_H
\ No newline at end of file