Rev 500 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef FLIGHTLOG_H
#define FLIGHTLOG_H
#include "Kopter.h"
#include "../typedefs.h"
#include <string>
#define USE_COLOR
#define ERROR_COLOR COLOR_FG_DARKRED
#define WARNING_COLOR COLOR_BG_LIGHTYELLOW
#define INFO_COLOR COLOR_NORMAL
//FlightCtrl
#define INFO_FC_COLOR COLOR_NORMAL
//NaviCtrl
#define INFO_NC_COLOR COLOR_FG_DARKBLUE
//GPS
#define INFO_GPS_COLOR COLOR_FG_DARKGREY
//MK3MAG
#define INFO_MK3_COLOR COLOR_FG_DARKGREEN
/**
* The FlightLog saves a human-readable log, so that we can see what happened.
*/
class FlightLog {
private:
//TODO: use a struct that contains timestamp and encoded data?
static char * log_str;
public:
static void info(char * dat);
static void info_FC(char * dat);
static void info_NC(char * dat);
static void info_GPS(char * dat);
static void info_MK3(char * dat);
static void warning(char * dat);
static void error(char * dat);
static void log_data(char * data, int length);
};
#endif