mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-28 19:48:31 -04:00
Plane: Move the plane centric arming code into arming_checks.cpp
Needed to move the plane centric arming code out of the AP_Arming library and into the plane vehcile code.
This commit is contained in:
parent
305ec7b08a
commit
3cb0c1bba8
@ -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
|
||||
|
@ -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[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user