From 2c1edee619270ead7a018ae4204ebc5eaf9c86b6 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 11 Nov 2019 13:45:00 +0900 Subject: [PATCH] AP_LandingGear: send-text only if servo output has been configured --- libraries/AP_LandingGear/AP_LandingGear.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/AP_LandingGear/AP_LandingGear.cpp b/libraries/AP_LandingGear/AP_LandingGear.cpp index 8bca7668b5..45dfc99f54 100644 --- a/libraries/AP_LandingGear/AP_LandingGear.cpp +++ b/libraries/AP_LandingGear/AP_LandingGear.cpp @@ -126,7 +126,10 @@ void AP_LandingGear::deploy() _deployed = true; _have_changed = true; - gcs().send_text(MAV_SEVERITY_INFO, "LandingGear: DEPLOY"); + // send message only if output has been configured + if (SRV_Channels::function_assigned(SRV_Channel::k_landing_gear_control)) { + gcs().send_text(MAV_SEVERITY_INFO, "LandingGear: DEPLOY"); + } } /// retract - retract landing gear @@ -139,7 +142,10 @@ void AP_LandingGear::retract() _deployed = false; _have_changed = true; - gcs().send_text(MAV_SEVERITY_INFO, "LandingGear: RETRACT"); + // send message only if output has been configured + if (SRV_Channels::function_assigned(SRV_Channel::k_landing_gear_control)) { + gcs().send_text(MAV_SEVERITY_INFO, "LandingGear: RETRACT"); + } } bool AP_LandingGear::deployed()