Skip to content

Commit

Permalink
ArduPlane: Pass the 4th parameter to ICE for engine start
Browse files Browse the repository at this point in the history
  • Loading branch information
WickedShell committed Sep 28, 2023
1 parent 88e1286 commit 545e44c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ArduPlane/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion ArduPlane/commands_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/mode_qloiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/quadplane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 545e44c

Please sign in to comment.