mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
Plane: add arming check for logging actually started
This commit is contained in:
parent
fff2068a5a
commit
f712dd5d7e
@ -122,6 +122,7 @@ public:
|
||||
AP_Param::setup_object_defaults(this, var_info);
|
||||
}
|
||||
bool pre_arm_checks(bool report);
|
||||
bool arm(uint8_t method) override;
|
||||
|
||||
// var_info for holding Parameter information
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
@ -18,8 +18,21 @@ const AP_Param::GroupInfo AP_Arming_Plane::var_info[] = {
|
||||
};
|
||||
|
||||
|
||||
bool AP_Arming_Plane::arm(uint8_t method)
|
||||
{
|
||||
// start logging here so we can check success or failure in
|
||||
// arm_checks
|
||||
if (plane.g.log_bitmask != NONE &&
|
||||
!plane.DataFlash.logging_started()) {
|
||||
plane.start_logging();
|
||||
}
|
||||
|
||||
return AP_Arming::arm(method);
|
||||
}
|
||||
|
||||
/*
|
||||
additional arming checks for plane
|
||||
|
||||
*/
|
||||
bool AP_Arming_Plane::pre_arm_checks(bool report)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user