2017-01-09 03:45:48 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_Arming/AP_Arming.h>
|
|
|
|
|
|
|
|
class AP_Arming_Copter : public AP_Arming
|
|
|
|
{
|
|
|
|
public:
|
2018-01-18 02:49:20 -04:00
|
|
|
friend class Copter;
|
|
|
|
friend class ToyMode;
|
2018-06-25 00:42:17 -03:00
|
|
|
|
|
|
|
AP_Arming_Copter() : AP_Arming()
|
2017-12-12 21:06:15 -04:00
|
|
|
{
|
2018-06-20 04:16:52 -03:00
|
|
|
// default REQUIRE parameter to 1 (Copter does not have an
|
|
|
|
// actual ARMING_REQUIRE parameter)
|
2019-03-06 23:12:50 -04:00
|
|
|
require.set_default((uint8_t)Required::YES_MIN_PWM);
|
2017-01-09 03:45:48 -04:00
|
|
|
}
|
|
|
|
|
2017-08-28 18:44:08 -03:00
|
|
|
/* Do not allow copies */
|
|
|
|
AP_Arming_Copter(const AP_Arming_Copter &other) = delete;
|
2018-03-05 16:28:35 -04:00
|
|
|
AP_Arming_Copter &operator=(const AP_Arming_Copter&) = delete;
|
2017-08-28 18:44:08 -03:00
|
|
|
|
2017-01-09 03:45:48 -04:00
|
|
|
void update(void);
|
2019-03-06 23:12:50 -04:00
|
|
|
bool all_checks_passing(AP_Arming::Method method);
|
2017-08-20 03:24:33 -03:00
|
|
|
|
2017-09-04 01:16:40 -03:00
|
|
|
bool rc_calibration_checks(bool display_failure) override;
|
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);
|
2019-03-06 23:12:50 -04:00
|
|
|
bool arm_checks(bool display_failure, AP_Arming::Method method);
|
2017-01-09 03:45:48 -04:00
|
|
|
|
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;
|
2017-09-04 00:23:42 -03:00
|
|
|
bool barometer_checks(bool display_failure) override;
|
2017-09-04 00:48:30 -03:00
|
|
|
bool board_voltage_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 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);
|
|
|
|
|
|
|
|
void set_pre_arm_check(bool b);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
};
|