Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
Logger.h
00001 #ifndef _H_LOGGER_H 00002 #define _H_LOGGER_H 00003 00004 #define xDEBUG_OUTPUT 00005 00006 #include <cstdio> 00007 #if defined(DEBUG) && defined(DEBUG_OUTPUT) 00008 #define LOG(x, ...) { printf("\x1b[34m%12.12s: \x1b[39m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } 00009 #define WARN(x, ...) { printf("\x1b[34m%12.12s: \x1b[33m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } 00010 #define ERR(x, ...) { printf("\x1b[34m%12.12s: \x1b[31m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } 00011 #define INFO(x, ...) { printf("\x1b[34m%12.12s: \x1b[32m"x"\x1b[39;49m\r\n", DEBUG, ##__VA_ARGS__); fflush(stdout); } 00012 #else 00013 #define LOG(x, ...) 00014 #define WARN(x, ...) 00015 #define ERR(x, ...) 00016 #define INFO(x, ...) 00017 #endif 00018 00019 #if defined(DATA_OUTPUT) 00020 #define DATA(x) { fwrite(&(x), sizeof (x), 1, stdout); fflush(stdout); } 00021 #else 00022 #define DATA(x) 00023 #endif 00024 00025 #endif//_H_LOGGER_H
Generated on Wed Jul 13 2022 08:50:41 by
