Plane: log flight_stage

logging plane flight stage in STAT.Stage
This commit is contained in:
Tom Pittenger 2015-09-25 18:30:26 -07:00 committed by Andrew Tridgell
parent 9ed6e6afa4
commit 617626f9f5
1 changed files with 3 additions and 1 deletions

View File

@ -316,6 +316,7 @@ struct PACKED log_Status {
uint8_t safety;
bool is_crashed;
bool is_still;
uint8_t stage;
};
void Plane::Log_Write_Status()
@ -329,6 +330,7 @@ void Plane::Log_Write_Status()
,safety : hal.util->safety_switch_state()
,is_crashed : crash_state.is_crashed
,is_still : plane.ins.is_still()
,stage : flight_stage
};
DataFlash.WriteBlock(&pkt, sizeof(pkt));
@ -494,7 +496,7 @@ static const struct LogStructure log_structure[] PROGMEM = {
{ LOG_ATRP_MSG, sizeof(AP_AutoTune::log_ATRP),
"ATRP", "QBBcfff", "TimeUS,Type,State,Servo,Demanded,Achieved,P" },
{ LOG_STATUS_MSG, sizeof(log_Status),
"STAT", "QBfBBBB", "TimeUS,isFlying,isFlyProb,Armed,Safety,Crash,Still" },
"STAT", "QBfBBBBB", "TimeUS,isFlying,isFlyProb,Armed,Safety,Crash,Still,Stage" },
#if OPTFLOW == ENABLED
{ LOG_OPTFLOW_MSG, sizeof(log_Optflow),
"OF", "QBffff", "TimeUS,Qual,flowX,flowY,bodyX,bodyY" },