diff --git a/ArduPlane/Parameters.cpp b/ArduPlane/Parameters.cpp index f100d417f5..fcb8138442 100644 --- a/ArduPlane/Parameters.cpp +++ b/ArduPlane/Parameters.cpp @@ -984,8 +984,8 @@ const AP_Param::Info Plane::var_info[] PROGMEM = { #endif // @Group: ARMING_ - // @Path: ../libraries/AP_Arming/AP_Arming.cpp - GOBJECT(arming, "ARMING_", AP_Arming), + // @Path: arming_checks.cpp + GOBJECT(arming, "ARMING_", AP_Arming_Plane), // @Group: RELAY_ // @Path: ../libraries/AP_Relay/AP_Relay.cpp diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index 4ce655470c..e46720af90 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -118,8 +118,13 @@ class AP_Arming_Plane : public AP_Arming public: AP_Arming_Plane(const AP_AHRS &ahrs_ref, const AP_Baro &baro, Compass &compass, const enum HomeState &home_set, gcs_send_t_p gcs_send) : - AP_Arming(ahrs_ref, baro, compass, home_set, gcs_send) {} + AP_Arming(ahrs_ref, baro, compass, home_set, gcs_send) { + AP_Param::setup_object_defaults(this, var_info); + } bool pre_arm_checks(bool report); + + // var_info for holding Parameter information + static const struct AP_Param::GroupInfo var_info[]; }; /* diff --git a/ArduPlane/arming_checks.cpp b/ArduPlane/arming_checks.cpp index 03a7e3de11..1489370cc1 100644 --- a/ArduPlane/arming_checks.cpp +++ b/ArduPlane/arming_checks.cpp @@ -4,6 +4,21 @@ */ #include "Plane.h" +const AP_Param::GroupInfo AP_Arming_Plane::var_info[] PROGMEM = { + // variables from parent vehicle + AP_NESTEDGROUPINFO(AP_Arming, 0), + + // @Param: RUDDER + // @DisplayName: Rudder Arming + // @Description: Control arm/disarm by rudder input. When enabled arming is done with right rudder, disarming with left rudder. Rudder arming only works in manual throttle modes with throttle at zero + // @Values: 0:Disabled,1:ArmingOnly,2:ArmOrDisarm + // @User: Advanced + AP_GROUPINFO("RUDDER", 3, AP_Arming_Plane, rudder_arming_value, ARMING_RUDDER_ARMONLY), + + AP_GROUPEND +}; + + /* additional arming checks for plane */ @@ -12,6 +27,9 @@ bool AP_Arming_Plane::pre_arm_checks(bool report) // call parent class checks bool ret = AP_Arming::pre_arm_checks(report); + // Check airspeed sensor + ret &= AP_Arming::airspeed_checks(report); + if (plane.g.roll_limit_cd < 300) { if (report) { gcs_send_text_P(MAV_SEVERITY_CRITICAL,PSTR("PreArm: LIM_ROLL_CD too small"));