forked from Archive/PX4-Autopilot
Add vtol states to sdlog2
This commit is contained in:
parent
1165e0a946
commit
b513edffcd
|
@ -1347,6 +1347,9 @@ int sdlog2_thread_main(int argc, char *argv[])
|
|||
if(copy_if_updated(ORB_ID(vtol_vehicle_status), &subs.vtol_status_sub, &buf.vtol_status)) {
|
||||
log_msg.msg_type = LOG_VTOL_MSG;
|
||||
log_msg.body.log_VTOL.airspeed_tot = buf.vtol_status.airspeed_tot;
|
||||
log_msg.body.log_VTOL.rw_mode = (uint8_t) buf.vtol_status.vtol_in_rw_mode;
|
||||
log_msg.body.log_VTOL.trans_mode = (uint8_t) buf.vtol_status.vtol_in_trans_mode;
|
||||
log_msg.body.log_VTOL.failsafe_mode = (uint8_t) buf.vtol_status.vtol_transition_failsafe;
|
||||
LOGBUFFER_WRITE_AND_COUNT(VTOL);
|
||||
}
|
||||
|
||||
|
|
|
@ -475,6 +475,9 @@ struct log_ENCD_s {
|
|||
#define LOG_VTOL_MSG 43
|
||||
struct log_VTOL_s {
|
||||
float airspeed_tot;
|
||||
uint8_t rw_mode;
|
||||
uint8_t trans_mode;
|
||||
uint8_t failsafe_mode;
|
||||
};
|
||||
|
||||
/* --- TIMESYNC - TIME SYNCHRONISATION OFFSET */
|
||||
|
@ -546,7 +549,7 @@ static const struct log_format_s log_formats[] = {
|
|||
LOG_FORMAT_S(ATTC, ATTC, "ffff", "Roll,Pitch,Yaw,Thrust"),
|
||||
LOG_FORMAT_S(ATC1, ATTC, "ffff", "Roll,Pitch,Yaw,Thrust"),
|
||||
LOG_FORMAT(STAT, "BBBfBBf", "MainState,ArmS,Failsafe,BatRem,BatWarn,Landed,Load"),
|
||||
LOG_FORMAT(VTOL, "f", "Arsp"),
|
||||
LOG_FORMAT(VTOL, "fBBB", "Arsp,RwMode,TransMode,Failsafe"),
|
||||
LOG_FORMAT(CTS, "fffffff", "Vx_b,Vy_b,Vz_b,Vinf,P,Q,R"),
|
||||
LOG_FORMAT(RC, "ffffffffffffBBBL", "C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,RSSI,CNT,Lost,Drop"),
|
||||
LOG_FORMAT_S(OUT0, OUT, "ffffffff", "Out0,Out1,Out2,Out3,Out4,Out5,Out6,Out7"),
|
||||
|
|
Loading…
Reference in New Issue