diff --git a/ArduPlane/arming_checks.cpp b/ArduPlane/AP_Arming.cpp similarity index 99% rename from ArduPlane/arming_checks.cpp rename to ArduPlane/AP_Arming.cpp index e383216bbe..0d751464fb 100644 --- a/ArduPlane/arming_checks.cpp +++ b/ArduPlane/AP_Arming.cpp @@ -1,6 +1,7 @@ /* additional arming checks for plane */ +#include "AP_Arming.h" #include "Plane.h" const AP_Param::GroupInfo AP_Arming_Plane::var_info[] = { diff --git a/ArduPlane/AP_Arming.h b/ArduPlane/AP_Arming.h new file mode 100644 index 0000000000..13ddc2c1de --- /dev/null +++ b/ArduPlane/AP_Arming.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +/* + a plane specific arming class + */ +class AP_Arming_Plane : public AP_Arming +{ +public: + AP_Arming_Plane(const AP_AHRS &ahrs_ref, const AP_Baro &baro, Compass &compass, + const AP_BattMonitor &battery) : + AP_Arming(ahrs_ref, baro, compass, battery) { + 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[]; + +protected: + bool ins_checks(bool report); + enum HomeState home_status() const override; + + // parameters + AP_Int8 rudder_arming_value; +}; diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 81a843c049..7332311a32 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -106,34 +106,12 @@ #include "Parameters.h" #include "avoidance_adsb.h" +#include "AP_Arming.h" #if CONFIG_HAL_BOARD == HAL_BOARD_SITL #include #endif -/* - a plane specific arming class - */ -class AP_Arming_Plane : public AP_Arming -{ -public: - AP_Arming_Plane(const AP_AHRS &ahrs_ref, const AP_Baro &baro, Compass &compass, - const AP_BattMonitor &battery) : - AP_Arming(ahrs_ref, baro, compass, battery) { - 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[]; - -protected: - bool ins_checks(bool report); - enum HomeState home_status() const override; -}; - - /* a plane specific AP_AdvancedFailsafe class */