Browse Source

Plane: use an enum for flash log message types

mission-4.1.18
Andrew Tridgell 12 years ago
parent
commit
bfaf91affe
  1. 40
      ArduPlane/defines.h

40
ArduPlane/defines.h

@ -134,24 +134,28 @@ enum gcs_severity {
SEVERITY_CRITICAL SEVERITY_CRITICAL
}; };
// Logging parameters // Logging message types. NOTE: If you change the value of one
#define LOG_INDEX_MSG 0xF0 // of these then existing logs will break! Only add at the end, and
#define LOG_ATTITUDE_MSG 0x01 // mark unused ones as 'deprecated', but leave them in
#define LOG_GPS_MSG 0x02 enum log_messages {
#define LOG_MODE_MSG 0X03 LOG_INDEX_MSG,
#define LOG_CONTROL_TUNING_MSG 0X04 LOG_ATTITUDE_MSG,
#define LOG_NAV_TUNING_MSG 0X05 LOG_GPS_MSG,
#define LOG_PERFORMANCE_MSG 0X06 LOG_MODE_MSG,
#define LOG_RAW_MSG 0x07 LOG_CONTROL_TUNING_MSG,
#define LOG_CMD_MSG 0x08 LOG_NAV_TUNING_MSG,
#define LOG_CURRENT_MSG 0x09 LOG_PERFORMANCE_MSG,
#define LOG_STARTUP_MSG 0x0A LOG_RAW_MSG,
#define TYPE_AIRSTART_MSG 0x00 LOG_CMD_MSG,
#define TYPE_GROUNDSTART_MSG 0x01 LOG_CURRENT_MSG,
#define MAX_NUM_LOGS 100 LOG_STARTUP_MSG,
TYPE_AIRSTART_MSG,
#define MASK_LOG_ATTITUDE_FAST (1<<0) TYPE_GROUNDSTART_MSG,
#define MASK_LOG_ATTITUDE_MED (1<<1) MAX_NUM_LOGS
};
#define MASK_LOG_ATTITUDE_FAST (1<<0)
#define MASK_LOG_ATTITUDE_MED (1<<1)
#define MASK_LOG_GPS (1<<2) #define MASK_LOG_GPS (1<<2)
#define MASK_LOG_PM (1<<3) #define MASK_LOG_PM (1<<3)
#define MASK_LOG_CTUN (1<<4) #define MASK_LOG_CTUN (1<<4)

Loading…
Cancel
Save