From f3cefcef8179f4f7cfdf0a69c9aebdfc167c2e93 Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Sat, 30 Nov 2019 10:08:18 -0500 Subject: [PATCH] Add support for "Auto" RC Smoothing derivative type --- locales/en/messages.json | 5 ++++- src/js/tabs/receiver.js | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/locales/en/messages.json b/locales/en/messages.json index b3249d94..187dbee8 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1625,7 +1625,7 @@ "message": "The channels smoothing applies to" }, "rcSmoothingDerivativeTypeHelp": { - "message": "The type of filtering method used for the setpoint derivative. Most users should use the default \"BIQUAD\" value as it provides a good balance between smoothness and delay. \"PT1\" reduces the delay slightly but provides less smoothing." + "message": "The type of filtering method used for the setpoint derivative. Starting with 4.2 the default value of \"Auto\" is recommended. For 4.1 and earlier most users should use the default \"BIQUAD\" value as it provides a good balance between smoothness and delay. \"PT1\" reduces the delay slightly but provides less smoothing." }, "rcSmoothingInputTypeHelp": { "message": "The type of filtering method used for the input. Most users should use the default \"BIQUAD\" value as it provides a good balance between smoothness and delay. \"PT1\" reduces the delay slightly but provides less smoothing." @@ -1651,6 +1651,9 @@ "receiverRcSmoothingDerivativeTypeOff": { "message": "Off" }, + "receiverRcSmoothingDerivativeTypeAuto": { + "message": "Auto" + }, "receiverRcSmoothingChannel": { "message": "Channels Smoothed" }, diff --git a/src/js/tabs/receiver.js b/src/js/tabs/receiver.js index 28854191..e1e3788b 100644 --- a/src/js/tabs/receiver.js +++ b/src/js/tabs/receiver.js @@ -383,6 +383,11 @@ TABS.receiver.initialize = function (callback) { }); rcSmoothingnDerivativeNumberElement.val(RX_CONFIG.rcSmoothingDerivativeCutoff); var rc_smoothing_derivative_type = $('select[name="rcSmoothingDerivativeType-select"]'); + + if (semver.gte(CONFIG.apiVersion, "1.43.0")) { + rc_smoothing_derivative_type.append($(``)); + } + rc_smoothing_derivative_type.change(function () { RX_CONFIG.rcSmoothingDerivativeType = $(this).val(); });