From 4103d5cdb968834bae1de361df9c7e78837a744c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 25 Aug 2023 12:35:18 +1000 Subject: [PATCH] Plane: accept DO_ENGINE_CONTROL as both COMMAND_LONG and COMMAND_INT --- ArduPlane/GCS_Mavlink.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ArduPlane/GCS_Mavlink.cpp b/ArduPlane/GCS_Mavlink.cpp index 99160eccea..d0f2e4b4f2 100644 --- a/ArduPlane/GCS_Mavlink.cpp +++ b/ArduPlane/GCS_Mavlink.cpp @@ -973,6 +973,14 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_int_packet(const mavlink_command_in return MAV_RESULT_DENIED; #endif +#if AP_ICENGINE_ENABLED + case MAV_CMD_DO_ENGINE_CONTROL: + if (!plane.g2.ice_control.engine_control(packet.param1, packet.param2, packet.param3)) { + return MAV_RESULT_FAILED; + } + return MAV_RESULT_ACCEPTED; +#endif + default: return GCS_MAVLINK::handle_command_int_packet(packet, msg); } @@ -1094,14 +1102,6 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_long_packet(const mavlink_command_l return MAV_RESULT_ACCEPTED; #endif -#if AP_ICENGINE_ENABLED - case MAV_CMD_DO_ENGINE_CONTROL: - if (!plane.g2.ice_control.engine_control(packet.param1, packet.param2, packet.param3)) { - return MAV_RESULT_FAILED; - } - return MAV_RESULT_ACCEPTED; -#endif - default: return GCS_MAVLINK::handle_command_long_packet(packet, msg); }