2017-01-09 03:45:48 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_Arming/AP_Arming.h>
|
|
|
|
|
|
|
|
class AP_Arming_Copter : public AP_Arming
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AP_Arming_Copter(const AP_AHRS_NavEKF &ahrs_ref, const AP_Baro &baro, Compass &compass,
|
|
|
|
const AP_BattMonitor &battery, const AP_InertialNav_NavEKF &inav,
|
|
|
|
const AP_InertialSensor &ins) :
|
|
|
|
AP_Arming(ahrs_ref, baro, compass, battery),
|
2016-12-30 00:52:53 -04:00
|
|
|
_inav(inav),
|
2017-01-09 03:45:48 -04:00
|
|
|
_ins(ins),
|
2016-12-30 00:52:53 -04:00
|
|
|
_ahrs_navekf(ahrs_ref)
|
2017-01-09 03:45:48 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void update(void);
|
|
|
|
bool all_checks_passing(bool arming_from_gcs);
|
2017-01-19 22:28:36 -04:00
|
|
|
void pre_arm_rc_checks(bool display_failure);
|
2017-01-09 03:45:48 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2016-12-29 04:28:08 -04:00
|
|
|
bool pre_arm_checks(bool display_failure) override;
|
2017-01-09 03:45:48 -04:00
|
|
|
bool pre_arm_ekf_attitude_check();
|
|
|
|
bool pre_arm_terrain_check(bool display_failure);
|
|
|
|
bool pre_arm_proximity_check(bool display_failure);
|
|
|
|
bool arm_checks(bool display_failure, bool arming_from_gcs);
|
|
|
|
|
2016-08-17 00:14:56 -03:00
|
|
|
// NOTE! the following check functions *DO* call into AP_Arming:
|
|
|
|
bool ins_checks(bool display_failure) override;
|
2016-08-17 08:21:05 -03:00
|
|
|
bool compass_checks(bool display_failure) override;
|
2017-03-08 21:59:07 -04:00
|
|
|
bool gps_checks(bool display_failure) override;
|
2016-08-17 00:14:56 -03:00
|
|
|
|
2017-01-09 03:45:48 -04:00
|
|
|
// NOTE! the following check functions *DO NOT* call into AP_Arming!
|
|
|
|
bool fence_checks(bool display_failure);
|
|
|
|
bool board_voltage_checks(bool display_failure);
|
|
|
|
bool parameter_checks(bool display_failure);
|
2017-01-09 01:43:39 -04:00
|
|
|
bool motor_checks(bool display_failure);
|
2017-01-09 03:45:48 -04:00
|
|
|
bool pilot_throttle_checks(bool display_failure);
|
|
|
|
bool barometer_checks(bool display_failure);
|
|
|
|
bool rc_calibration_checks(bool display_failure);
|
|
|
|
|
|
|
|
void set_pre_arm_check(bool b);
|
|
|
|
void set_pre_arm_rc_check(bool b);
|
|
|
|
|
|
|
|
enum HomeState home_status() const override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2016-12-30 00:52:53 -04:00
|
|
|
const AP_InertialNav_NavEKF &_inav;
|
2017-01-09 03:45:48 -04:00
|
|
|
const AP_InertialSensor &_ins;
|
2016-12-30 00:52:53 -04:00
|
|
|
const AP_AHRS_NavEKF &_ahrs_navekf;
|
2017-01-09 03:45:48 -04:00
|
|
|
|
|
|
|
};
|