Subversion Repositories Projects

Rev

Rev 500 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
500 Brean 1
#ifndef FLIGHTLOG_H
2
#define FLIGHTLOG_H
3
#include "Kopter.h"
4
#include "../typedefs.h"
5
#include <string>
6
 
7
#define USE_COLOR
8
#define ERROR_COLOR         COLOR_FG_DARKRED
9
#define WARNING_COLOR       COLOR_BG_LIGHTYELLOW
10
#define INFO_COLOR          COLOR_NORMAL
513 Brean 11
//FlightCtrl
12
#define INFO_FC_COLOR       COLOR_NORMAL
13
//NaviCtrl
14
#define INFO_NC_COLOR       COLOR_FG_DARKBLUE
15
//GPS
16
#define INFO_GPS_COLOR      COLOR_FG_DARKGREY
17
//MK3MAG
18
#define INFO_MK3_COLOR      COLOR_FG_DARKGREEN
500 Brean 19
 
20
/**
513 Brean 21
 * The FlightLog saves a human-readable log, so that we can see what happened.
500 Brean 22
 */
23
 
24
class FlightLog {
25
    private:
26
        //TODO: use a struct that contains timestamp and encoded data?
27
        static char * log_str;
28
 
29
    public:
30
        static void info(char * dat);
513 Brean 31
        static void info_FC(char * dat);
32
        static void info_NC(char * dat);
33
        static void info_GPS(char * dat);
34
        static void info_MK3(char * dat);
500 Brean 35
        static void warning(char * dat);
36
        static void error(char * dat);
513 Brean 37
        static void log_data(char * data, int length);
500 Brean 38
};
39
 
40
#endif