diff --git a/locales/en/messages.json b/locales/en/messages.json index 8876851aea..f7270d978a 100755 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -4794,7 +4794,7 @@ "message": "The distance the aircraft will climb, above the current altitude, when a rescue is initiated and the altitude mode is set to CURRENT Altitude; also added when in MAX Altitude mode." }, "failsafeGpsRescueItemReturnAltitude": { - "message": "Return altitude (meters) - only applies in Fixed Altitude mode" + "message": "Return altitude (meters)" }, "failsafeGpsRescueItemAscendRate": { "message": "Ascend rate (meters/second)" diff --git a/src/js/tabs/failsafe.js b/src/js/tabs/failsafe.js index 631e0e3ebc..fa4b53b8a2 100644 --- a/src/js/tabs/failsafe.js +++ b/src/js/tabs/failsafe.js @@ -314,6 +314,18 @@ failsafe.initialize = function (callback) { // Sort the element, if need to group, do it by lexical sort, ie. by naming of (the translated) selection text $("#failsafeGpsRescueItemAltitudeSelect").sortSelect(); + // Show the return altitude input if the alt mode equals to FixedAlt + function showReturnAlt() { + let altitude_number_field = $('input[name="gps_rescue_return_altitude"]').closest(".number"); + if ($("#failsafeGpsRescueItemAltitudeSelect").val() === "1") { + altitude_number_field.show(); + } else { + altitude_number_field.hide(); + } + } + showReturnAlt(); + $("#failsafeGpsRescueItemAltitudeSelect").on("change", showReturnAlt); + // Introduced in 1.43 $('input[name="gps_rescue_ascend_rate"]').val((FC.GPS_RESCUE.ascendRate / 100).toFixed(1)); $('input[name="gps_rescue_descend_rate"]').val((FC.GPS_RESCUE.descendRate / 100).toFixed(1));