mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 21:03:34 +08:00
Merge branch 'master' into inav_alt_gps. Use GPS for altitude estimation.
This commit is contained in:
@@ -48,12 +48,6 @@
|
||||
/* define message formats */
|
||||
|
||||
#pragma pack(push, 1)
|
||||
/* --- TIME - TIME STAMP --- */
|
||||
#define LOG_TIME_MSG 1
|
||||
struct log_TIME_s {
|
||||
uint64_t t;
|
||||
};
|
||||
|
||||
/* --- ATT - ATTITUDE --- */
|
||||
#define LOG_ATT_MSG 2
|
||||
struct log_ATT_s {
|
||||
@@ -253,38 +247,41 @@ struct log_GVSP_s {
|
||||
float vz;
|
||||
};
|
||||
|
||||
/* --- FWRV - FIRMWARE REVISION --- */
|
||||
#define LOG_FWRV_MSG 20
|
||||
struct log_FWRV_s {
|
||||
char fw_revision[64];
|
||||
};
|
||||
|
||||
/* --- DIST - DISTANCE TO SURFACE --- */
|
||||
#define LOG_DIST_MSG 21
|
||||
#define LOG_DIST_MSG 20
|
||||
struct log_DIST_s {
|
||||
float bottom;
|
||||
float bottom_rate;
|
||||
uint8_t flags;
|
||||
};
|
||||
|
||||
/********** SYSTEM MESSAGES, ID > 0x80 **********/
|
||||
|
||||
/* --- TIME - TIME STAMP --- */
|
||||
#define LOG_TIME_MSG 129
|
||||
struct log_TIME_s {
|
||||
uint64_t t;
|
||||
};
|
||||
|
||||
/* --- VER - VERSION --- */
|
||||
#define LOG_VER_MSG 130
|
||||
struct log_VER_s {
|
||||
char arch[16];
|
||||
char fw_git[64];
|
||||
};
|
||||
|
||||
/* --- PARM - PARAMETER --- */
|
||||
#define LOG_PARM_MSG 131
|
||||
struct log_PARM_s {
|
||||
char name[16];
|
||||
float value;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
/*
|
||||
GIT_VERSION is defined at build time via a Makefile call to the
|
||||
git command line. We create a fake log message format for
|
||||
the firmware revision "FWRV" that is written to every log
|
||||
header. This makes it easier to determine which version
|
||||
of the firmware was running when a log was created.
|
||||
*/
|
||||
#define FREEZE_STR(s) #s
|
||||
#define STRINGIFY(s) FREEZE_STR(s)
|
||||
#define FW_VERSION_STR STRINGIFY(GIT_VERSION)
|
||||
|
||||
/* construct list of all message formats */
|
||||
|
||||
static const struct log_format_s log_formats[] = {
|
||||
LOG_FORMAT(TIME, "Q", "StartTime"),
|
||||
/* business-level messages, ID < 0x80 */
|
||||
LOG_FORMAT(ATT, "ffffff", "Roll,Pitch,Yaw,RollRate,PitchRate,YawRate"),
|
||||
LOG_FORMAT(ATSP, "ffff", "RollSP,PitchSP,YawSP,ThrustSP"),
|
||||
LOG_FORMAT(IMU, "fffffffff", "AccX,AccY,AccZ,GyroX,GyroY,GyroZ,MagX,MagY,MagZ"),
|
||||
@@ -303,8 +300,11 @@ static const struct log_format_s log_formats[] = {
|
||||
LOG_FORMAT(GPSP, "BLLfffbBffff", "AltRel,Lat,Lon,Alt,Yaw,LoiterR,LoiterDir,NavCmd,P1,P2,P3,P4"),
|
||||
LOG_FORMAT(ESC, "HBBBHHHHHHfH", "Counter,NumESC,Conn,N,Ver,Adr,Volt,Amp,RPM,Temp,SetP,SetPRAW"),
|
||||
LOG_FORMAT(GVSP, "fff", "VX,VY,VZ"),
|
||||
LOG_FORMAT(FWRV, "Z", FW_VERSION_STR),
|
||||
LOG_FORMAT(DIST, "ffB", "Bottom,BottomRate,Flags"),
|
||||
/* system-level messages, ID >= 0x80 */
|
||||
// FMT: don't write format of format message, it's useless
|
||||
LOG_FORMAT(TIME, "Q", "StartTime"),
|
||||
LOG_FORMAT(VER, "NZ", "Arch,FwGit"),
|
||||
LOG_FORMAT(PARM, "Nf", "Name,Value"),
|
||||
};
|
||||
|
||||
static const int log_formats_num = sizeof(log_formats) / sizeof(struct log_format_s);
|
||||
|
||||
Reference in New Issue
Block a user