Plane: added armed and safety state to STAT log message

This commit is contained in:
Andrew Tridgell 2015-04-30 11:15:08 +10:00
parent 5038e1d26d
commit 75c9689a64
1 changed files with 5 additions and 1 deletions

View File

@ -325,6 +325,8 @@ struct PACKED log_Status {
uint32_t timestamp;
uint8_t is_flying;
float is_flying_probability;
uint8_t armed;
uint8_t safety;
};
static void Log_Write_Status()
@ -334,6 +336,8 @@ static void Log_Write_Status()
,timestamp : hal.scheduler->millis()
,is_flying : is_flying()
,is_flying_probability : isFlyingProbability
,armed : hal.util->get_soft_armed()
,safety : hal.util->safety_switch_state()
};
DataFlash.WriteBlock(&pkt, sizeof(pkt));
@ -470,7 +474,7 @@ static const struct LogStructure log_structure[] PROGMEM = {
{ LOG_ATRP_MSG, sizeof(AP_AutoTune::log_ATRP),
"ATRP", "IBBcfff", "TimeMS,Type,State,Servo,Demanded,Achieved,P" },
{ LOG_STATUS_MSG, sizeof(log_Status),
"STAT", "IBf", "TimeMS,isFlying,isFlyProb" },
"STAT", "IBfBB", "TimeMS,isFlying,isFlyProb,Armed,Safety" },
#if OPTFLOW == ENABLED
{ LOG_OPTFLOW_MSG, sizeof(log_Optflow),
"OF", "IBffff", "TimeMS,Qual,flowX,flowY,bodyX,bodyY" },