mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
Plane: log flight_stage
logging plane flight stage in STAT.Stage
This commit is contained in:
parent
9ed6e6afa4
commit
617626f9f5
@ -316,6 +316,7 @@ struct PACKED log_Status {
|
|||||||
uint8_t safety;
|
uint8_t safety;
|
||||||
bool is_crashed;
|
bool is_crashed;
|
||||||
bool is_still;
|
bool is_still;
|
||||||
|
uint8_t stage;
|
||||||
};
|
};
|
||||||
|
|
||||||
void Plane::Log_Write_Status()
|
void Plane::Log_Write_Status()
|
||||||
@ -329,6 +330,7 @@ void Plane::Log_Write_Status()
|
|||||||
,safety : hal.util->safety_switch_state()
|
,safety : hal.util->safety_switch_state()
|
||||||
,is_crashed : crash_state.is_crashed
|
,is_crashed : crash_state.is_crashed
|
||||||
,is_still : plane.ins.is_still()
|
,is_still : plane.ins.is_still()
|
||||||
|
,stage : flight_stage
|
||||||
};
|
};
|
||||||
|
|
||||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||||
@ -494,7 +496,7 @@ static const struct LogStructure log_structure[] PROGMEM = {
|
|||||||
{ LOG_ATRP_MSG, sizeof(AP_AutoTune::log_ATRP),
|
{ LOG_ATRP_MSG, sizeof(AP_AutoTune::log_ATRP),
|
||||||
"ATRP", "QBBcfff", "TimeUS,Type,State,Servo,Demanded,Achieved,P" },
|
"ATRP", "QBBcfff", "TimeUS,Type,State,Servo,Demanded,Achieved,P" },
|
||||||
{ LOG_STATUS_MSG, sizeof(log_Status),
|
{ 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
|
#if OPTFLOW == ENABLED
|
||||||
{ LOG_OPTFLOW_MSG, sizeof(log_Optflow),
|
{ LOG_OPTFLOW_MSG, sizeof(log_Optflow),
|
||||||
"OF", "QBffff", "TimeUS,Qual,flowX,flowY,bodyX,bodyY" },
|
"OF", "QBffff", "TimeUS,Qual,flowX,flowY,bodyX,bodyY" },
|
||||||
|
Loading…
Reference in New Issue
Block a user