Plane: added engine cut on land final in quadplane

This commit is contained in:
Andrew Tridgell 2016-07-25 15:46:17 +10:00
parent d25396543c
commit f65b46385c
2 changed files with 15 additions and 0 deletions

View File

@ -313,6 +313,13 @@ const AP_Param::GroupInfo QuadPlane::var_info[] = {
// @Increment: 0.25
// @User: Standard
AP_GROUPINFO("VFWD_ALT", 43, QuadPlane, vel_forward_alt_cutoff, 0),
// @Param: LAND_ICE_CUT
// @DisplayName: Cut IC engine on landing
// @Description: This controls stopping an internal combustion engine in the final landing stage of a VTOL. This is important for aircraft where the forward thrust engine may experience prop-strike if left running during landing. This requires the engine controls are enabled using the ICE_* parameters.
// @Values: 0:Disabled,1:Enabled
// @User: Standard
AP_GROUPINFO("LAND_ICE_CUT", 44, QuadPlane, land_icengine_cut, 1),
AP_GROUPEND
};
@ -1669,6 +1676,11 @@ bool QuadPlane::verify_vtol_land(void)
if (poscontrol.state == QPOS_LAND_DESCEND && height_above_ground < land_final_alt) {
poscontrol.state = QPOS_LAND_FINAL;
pos_control->set_alt_target(inertial_nav.get_altitude());
// cut IC engine if enabled
if (land_icengine_cut != 0) {
plane.g2.ice_control.engine_control(0, 0, 0);
}
plane.gcs_send_text(MAV_SEVERITY_INFO,"Land final started");
}

View File

@ -224,6 +224,9 @@ private:
// control ESC throttle calibration
AP_Int8 esc_calibration;
void run_esc_calibration(void);
// ICEngine control on landing
AP_Int8 land_icengine_cut;
struct {
AP_Float gain;