diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2013-06-07 13:36:15 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2013-06-07 13:36:15 +0400 |
commit | 5bad18691649b4b50d46c11384c3aa5051b6519e (patch) | |
tree | c84ab28a046d24ff264456a3e0287948b02c55ad /src/modules/sdlog2/sdlog2_messages.h | |
parent | 4052652a28232edcdcb8089dcb05a8dc426343e4 (diff) | |
download | px4-firmware-5bad18691649b4b50d46c11384c3aa5051b6519e.tar.gz px4-firmware-5bad18691649b4b50d46c11384c3aa5051b6519e.tar.bz2 px4-firmware-5bad18691649b4b50d46c11384c3aa5051b6519e.zip |
sdlog2: STAT (vehicle state) log message added, minor optimizations
Diffstat (limited to 'src/modules/sdlog2/sdlog2_messages.h')
-rw-r--r-- | src/modules/sdlog2/sdlog2_messages.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/sdlog2/sdlog2_messages.h b/src/modules/sdlog2/sdlog2_messages.h index 44c6b9cba..2b6b86521 100644 --- a/src/modules/sdlog2/sdlog2_messages.h +++ b/src/modules/sdlog2/sdlog2_messages.h @@ -141,6 +141,20 @@ struct log_ATTC_s { float yaw; float thrust; }; + +/* --- STAT - VEHICLE STATE --- */ +#define LOG_STAT_MSG 10 +struct log_STAT_s { + unsigned char state; + unsigned char flight_mode; + unsigned char manual_control_mode; + unsigned char manual_sas_mode; + unsigned char armed; + float battery_voltage; + float battery_current; + float battery_remaining; + unsigned char battery_warning; +}; #pragma pack(pop) /* construct list of all message formats */ @@ -155,6 +169,7 @@ static const struct log_format_s log_formats[] = { LOG_FORMAT(LPSP, "ffff", "X,Y,Z,Yaw"), LOG_FORMAT(GPS, "QBffLLfffff", "GPSTime,FixType,EPH,EPV,Lat,Lon,Alt,VelN,VelE,VelD,Cog"), LOG_FORMAT(ATTC, "ffff", "Roll,Pitch,Yaw,Thrust"), + LOG_FORMAT(STAT, "BBBBBfffB", "State,FlightMode,CtlMode,SASMode,Armed,BatV,BatC,BatRem,BatWarn"), }; static const int log_formats_num = sizeof(log_formats) / sizeof(struct log_format_s); |