From 545e44c305f9990c6f055a50709d257d2570d28a Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Mon, 19 Jul 2021 16:54:33 -0700 Subject: [PATCH] ArduPlane: Pass the 4th parameter to ICE for engine start --- ArduPlane/GCS_Mavlink.cpp | 2 +- ArduPlane/commands_logic.cpp | 3 ++- ArduPlane/mode_qloiter.cpp | 2 +- ArduPlane/quadplane.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ArduPlane/GCS_Mavlink.cpp b/ArduPlane/GCS_Mavlink.cpp index 15593a66fd7b01..0afec876735934 100644 --- a/ArduPlane/GCS_Mavlink.cpp +++ b/ArduPlane/GCS_Mavlink.cpp @@ -980,7 +980,7 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_int_packet(const mavlink_command_in #if AP_ICENGINE_ENABLED case MAV_CMD_DO_ENGINE_CONTROL: - if (!plane.g2.ice_control.engine_control(packet.param1, packet.param2, packet.param3)) { + if (!plane.g2.ice_control.engine_control(packet.param1, packet.param2, packet.param3, packet.param4)) { return MAV_RESULT_FAILED; } return MAV_RESULT_ACCEPTED; diff --git a/ArduPlane/commands_logic.cpp b/ArduPlane/commands_logic.cpp index 9d603addea9861..7f2a8173c79f18 100644 --- a/ArduPlane/commands_logic.cpp +++ b/ArduPlane/commands_logic.cpp @@ -195,7 +195,8 @@ bool Plane::start_command(const AP_Mission::Mission_Command& cmd) case MAV_CMD_DO_ENGINE_CONTROL: plane.g2.ice_control.engine_control(cmd.content.do_engine_control.start_control, cmd.content.do_engine_control.cold_start, - cmd.content.do_engine_control.height_delay_cm*0.01f); + cmd.content.do_engine_control.height_delay_cm*0.01f, + cmd.content.do_engine_control.allow_disarmed_start); break; #endif diff --git a/ArduPlane/mode_qloiter.cpp b/ArduPlane/mode_qloiter.cpp index 50dd8deea749bb..2eea970c58be36 100644 --- a/ArduPlane/mode_qloiter.cpp +++ b/ArduPlane/mode_qloiter.cpp @@ -104,7 +104,7 @@ void ModeQLoiter::run() #if AP_ICENGINE_ENABLED // cut IC engine if enabled if (quadplane.land_icengine_cut != 0) { - plane.g2.ice_control.engine_control(0, 0, 0); + plane.g2.ice_control.engine_control(0, 0, 0, false); } #endif // AP_ICENGINE_ENABLED } diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 93d062d38d2cf7..164d7e93841cc5 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -3609,7 +3609,7 @@ bool QuadPlane::verify_vtol_land(void) #if AP_ICENGINE_ENABLED // cut IC engine if enabled if (land_icengine_cut != 0) { - plane.g2.ice_control.engine_control(0, 0, 0); + plane.g2.ice_control.engine_control(0, 0, 0, false); } #endif // AP_ICENGINE_ENABLED gcs().send_text(MAV_SEVERITY_INFO,"Land final started");