diff --git a/locales/en/messages.json b/locales/en/messages.json index eb8695ed..79ebb305 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1679,19 +1679,19 @@ "receiverRcSmoothingManual": { "message": "Manual" }, - "receiverRcSmoothingAutoSmoothness": { - "message": "Auto Smoothness", - "description": "Auto Smoothness parameter for RC smoothing" + "receiverRcSmoothingAutoFactor": { + "message": "Auto Factor", + "description": "Auto Factor parameter for RC smoothing" }, - "receiverRcSmoothingAutoSmoothnessHelp": { - "message": "Adjusts the Auto smoothing calculation, 10 is the default smoothing to delay ratio. Increasing the number will smooth RC inputs more, while also adding delay. This may be useful for unreliable RC connections or for cinematic flying.
Be careful with numbers approaching 50, input delay will become noticeable.
Use the CLI command rc_smoothing_info while TX and RX are powered to see the automatically calculated RC smoothing cutoffs. ", - "description": "Auto Smoothness parameter help message" + "receiverRcSmoothingAutoFactorHelp": { + "message": "Adjusts the Auto factor calculation, 10 is the default factor to delay ratio. Increasing the number will smooth RC inputs more, while also adding delay. This may be useful for unreliable RC connections or for cinematic flying.
Be careful with numbers approaching 50, input delay will become noticeable.
Use the CLI command rc_smoothing_info while TX and RX are powered to see the automatically calculated RC smoothing cutoffs. ", + "description": "Auto Factor parameter help message" }, - "receiverRcDerivativeTypeSelect": { - "message": "Derivative Cutoff Type" + "receiverRcFeedforwardTypeSelect": { + "message": "FeedForward Cutoff Type" }, - "receiverRcInputTypeSelect": { - "message": "Input Cutoff Type" + "receiverRcSetpointTypeSelect": { + "message": "Setpoint Cutoff Type" }, "receiverRcSmoothingInterpolation": { "message": "Interpolation" @@ -1702,43 +1702,43 @@ "receiverRcSmoothingTypeHelp": { "message": "Type of RC smoothing used" }, - "rcSmoothingInputCutoffHelp": { - "message": "The cutoff frequency in Hz used by the input filter. Using lower values will result in smoother inputs and are more appropriate for slower receiver protocols. Most users should leave this at 0 corresponding to \"Auto\"." + "rcSmoothingSetpointCutoffHelp": { + "message": "The cutoff frequency in Hz used by the setpoint filter. Using lower values will result in smoother inputs and are more appropriate for slower receiver protocols. Most users should leave this at 0 corresponding to \"Auto\"." }, - "rcSmoothingDerivativeCutoffHelp": { - "message": "The cutoff frequency in Hz used by the setpoint derivative filter. Using lower values will result in smoother inputs and are more appropriate for slower receiver protocols. Most users should leave this at 0 corresponding to \"Auto\"." + "rcSmoothingFeedforwardCutoffHelp": { + "message": "The cutoff frequency in Hz used by the feedforward filter. Using lower values will result in smoother inputs and are more appropriate for slower receiver protocols. Most users should leave this at 0 corresponding to \"Auto\"." }, "rcSmoothingChannelsSmoothedHelp": { "message": "The channels smoothing applies to" }, - "rcSmoothingDerivativeTypeHelp": { - "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." + "rcSmoothingFeedforwardTypeHelp": { + "message": "The type of filtering method used for the feedforward. 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." + "rcSmoothingSetpointTypeHelp": { + "message": "The type of filtering method used for the setpoint. 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." }, - "receiverRcSmoothingInputManual": { - "message": "Selects whether the input filter cutoff frequency is automatically calculated (recommended) or manually selected by the user. Using \"Manual\" is not recommended for receiver protocols like Crossfire which can change in flight." + "receiverRcSmoothingSetpointManual": { + "message": "Selects whether the setpoint filter cutoff frequency is automatically calculated (recommended) or manually selected by the user. Using \"Manual\" is not recommended for receiver protocols like Crossfire which can change in flight." }, - "receiverRcSmoothingDerivativeManual": { - "message": "Selects whether the setpoint derivative filter cutoff frequency is automatically calculated (recommended) or manually selected by the user. Using \"Manual\" is not recommended for receiver protocols like Crossfire which can change in flight." + "receiverRcSmoothingFeedforwardManual": { + "message": "Selects whether the feedforward filter cutoff frequency is automatically calculated (recommended) or manually selected by the user. Using \"Manual\" is not recommended for receiver protocols like Crossfire which can change in flight." }, - "receiverRcSmoothingInputHz": { - "message": "Input Cutoff Frequency" + "receiverRcSmoothingSetpointHz": { + "message": "Setpoint Cutoff Frequency" }, - "receiverRcSmoothingDerivativeCutoff": { - "message": "Derivative Cutoff Frequency" + "receiverRcSmoothingFeedforwardCutoff": { + "message": "FeedForward Cutoff Frequency" }, - "receiverRcInputType": { - "message": "Input Filter Type" + "receiverRcSetpointType": { + "message": "Setpoint Filter Type" }, - "receiverRcDerivativeType": { - "message": "Derivative Filter Type" + "receiverRcFeedforwardType": { + "message": "Feedforward Filter Type" }, - "receiverRcSmoothingDerivativeTypeOff": { + "receiverRcSmoothingFeedforwardTypeOff": { "message": "Off" }, - "receiverRcSmoothingDerivativeTypeAuto": { + "receiverRcSmoothingFeedforwardTypeAuto": { "message": "Auto" }, "receiverRcSmoothingChannel": { @@ -1771,6 +1771,9 @@ "receiverRcInterpolationInterval": { "message": "RC Interpolation Interval [ms]" }, + "receiverRcSmoothingMode": { + "message": "Smoothing Mode" + }, "pidTuningFeedforwardTransition": { "message": "Transition" }, diff --git a/src/js/fc.js b/src/js/fc.js index 665085b3..56dc06b1 100644 --- a/src/js/fc.js +++ b/src/js/fc.js @@ -540,12 +540,13 @@ const FC = { rxSpiRfChannelCount: 0, fpvCamAngleDegrees: 0, rcSmoothingType: 0, - rcSmoothingInputCutoff: 0, - rcSmoothingDerivativeCutoff: 0, + rcSmoothingSetpointCutoff: 0, + rcSmoothingFeedforwardCutoff: 0, rcSmoothingInputType: 0, rcSmoothingDerivativeType: 0, - rcSmoothingAutoSmoothness: 0, + rcSmoothingAutoFactor: 0, usbCdcHidType: 0, + rcSmoothingMode: 0, }; this.FAILSAFE_CONFIG = { diff --git a/src/js/msp/MSPHelper.js b/src/js/msp/MSPHelper.js index 177e0132..6be51a3e 100644 --- a/src/js/msp/MSPHelper.js +++ b/src/js/msp/MSPHelper.js @@ -976,13 +976,16 @@ MspHelper.prototype.process_data = function(dataHandler) { if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_40)) { FC.RX_CONFIG.rcInterpolationChannels = data.readU8(); FC.RX_CONFIG.rcSmoothingType = data.readU8(); - FC.RX_CONFIG.rcSmoothingInputCutoff = data.readU8(); - FC.RX_CONFIG.rcSmoothingDerivativeCutoff = data.readU8(); + FC.RX_CONFIG.rcSmoothingSetpointCutoff = data.readU8(); + FC.RX_CONFIG.rcSmoothingFeedforwardCutoff = data.readU8(); FC.RX_CONFIG.rcSmoothingInputType = data.readU8(); FC.RX_CONFIG.rcSmoothingDerivativeType = data.readU8(); if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) { FC.RX_CONFIG.usbCdcHidType = data.readU8(); - FC.RX_CONFIG.rcSmoothingAutoSmoothness = data.readU8(); + FC.RX_CONFIG.rcSmoothingAutoFactor = data.readU8(); + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) { + FC.RX_CONFIG.rcSmoothingMode = data.readU8(); + } } } } else { @@ -1882,13 +1885,16 @@ MspHelper.prototype.crunch = function(code) { if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_40)) { buffer.push8(FC.RX_CONFIG.rcInterpolationChannels) .push8(FC.RX_CONFIG.rcSmoothingType) - .push8(FC.RX_CONFIG.rcSmoothingInputCutoff) - .push8(FC.RX_CONFIG.rcSmoothingDerivativeCutoff) + .push8(FC.RX_CONFIG.rcSmoothingSetpointCutoff) + .push8(FC.RX_CONFIG.rcSmoothingFeedforwardCutoff) .push8(FC.RX_CONFIG.rcSmoothingInputType) .push8(FC.RX_CONFIG.rcSmoothingDerivativeType); if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) { buffer.push8(FC.RX_CONFIG.usbCdcHidType) - .push8(FC.RX_CONFIG.rcSmoothingAutoSmoothness); + .push8(FC.RX_CONFIG.rcSmoothingAutoFactor); + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) { + buffer.push8(FC.RX_CONFIG.rcSmoothingMode); + } } } } diff --git a/src/js/tabs/receiver.js b/src/js/tabs/receiver.js index f4fa5080..49dee2b6 100644 --- a/src/js/tabs/receiver.js +++ b/src/js/tabs/receiver.js @@ -417,15 +417,15 @@ TABS.receiver.initialize = function (callback) { } if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_40)) { - FC.RX_CONFIG.rcSmoothingInputCutoff = parseInt($('input[name="rcSmoothingInputHz-number"]').val()); - FC.RX_CONFIG.rcSmoothingDerivativeCutoff = parseInt($('input[name="rcSmoothingDerivativeCutoff-number"]').val()); - FC.RX_CONFIG.rcSmoothingDerivativeType = parseInt($('select[name="rcSmoothingDerivativeType-select"]').val()); + FC.RX_CONFIG.rcSmoothingSetpointCutoff = parseInt($('input[name="rcSmoothingSetpointHz-number"]').val()); + FC.RX_CONFIG.rcSmoothingFeedforwardCutoff = parseInt($('input[name="rcSmoothingFeedforwardCutoff-number"]').val()); + FC.RX_CONFIG.rcSmoothingDerivativeType = parseInt($('select[name="rcSmoothingFeedforwardType-select"]').val()); FC.RX_CONFIG.rcInterpolationChannels = parseInt($('select[name="rcSmoothingChannels-select"]').val()); - FC.RX_CONFIG.rcSmoothingInputType = parseInt($('select[name="rcSmoothingInputType-select"]').val()); + FC.RX_CONFIG.rcSmoothingInputType = parseInt($('select[name="rcSmoothingSetpointType-select"]').val()); } if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) { - FC.RX_CONFIG.rcSmoothingAutoSmoothness = parseInt($('input[name="rcSmoothingAutoSmoothness-number"]').val()); + FC.RX_CONFIG.rcSmoothingAutoFactor = parseInt($('input[name="rcSmoothingAutoFactor-number"]').val()); } function save_rssi_config() { @@ -524,98 +524,99 @@ TABS.receiver.initialize = function (callback) { $(".bind_btn").toggle(showBindButton); // RC Smoothing + const smoothingOnOff = ((semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) ? + FC.RX_CONFIG.rcSmoothingMode : FC.RX_CONFIG.rcSmoothingType); + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_40)) { $('.tab-receiver .rcSmoothing').show(); const rc_smoothing_protocol_e = $('select[name="rcSmoothing-select"]'); rc_smoothing_protocol_e.change(function () { - FC.RX_CONFIG.rcSmoothingType = $(this).val(); + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) { + FC.RX_CONFIG.rcSmoothingMode = parseFloat($(this).val()); + } else { + FC.RX_CONFIG.rcSmoothingType = parseFloat($(this).val()); + } updateInterpolationView(); }); - rc_smoothing_protocol_e.val(FC.RX_CONFIG.rcSmoothingType); + rc_smoothing_protocol_e.val(smoothingOnOff); - const rcSmoothingNumberElement = $('input[name="rcSmoothingInputHz-number"]'); - const rcSmoothingDerivativeNumberElement = $('input[name="rcSmoothingDerivativeCutoff-number"]'); - rcSmoothingNumberElement.val(FC.RX_CONFIG.rcSmoothingInputCutoff); - rcSmoothingDerivativeNumberElement.val(FC.RX_CONFIG.rcSmoothingDerivativeCutoff); - $('.tab-receiver .rcSmoothing-input-cutoff').show(); - $('select[name="rcSmoothing-input-manual-select"]').val("1"); - if (FC.RX_CONFIG.rcSmoothingInputCutoff == 0) { - $('.tab-receiver .rcSmoothing-input-cutoff').hide(); - $('select[name="rcSmoothing-input-manual-select"]').val("0"); + const rcSmoothingNumberElement = $('input[name="rcSmoothingSetpointHz-number"]'); + const rcSmoothingFeedforwardNumberElement = $('input[name="rcSmoothingFeedforwardCutoff-number"]'); + rcSmoothingNumberElement.val(FC.RX_CONFIG.rcSmoothingSetpointCutoff); + rcSmoothingFeedforwardNumberElement.val(FC.RX_CONFIG.rcSmoothingFeedforwardCutoff); + $('.tab-receiver .rcSmoothing-setpoint-cutoff').show(); + $('select[name="rcSmoothing-setpoint-manual-select"]').val("1"); + if (FC.RX_CONFIG.rcSmoothingSetpointCutoff === 0) { + $('.tab-receiver .rcSmoothing-setpoint-cutoff').hide(); + $('select[name="rcSmoothing-setpoint-manual-select"]').val("0"); } - $('select[name="rcSmoothing-input-manual-select"]').change(function () { - if ($(this).val() == 0) { + $('select[name="rcSmoothing-setpoint-manual-select"]').change(function () { + if ($(this).val() === "0") { rcSmoothingNumberElement.val(0); - $('.tab-receiver .rcSmoothing-input-cutoff').hide(); + $('.tab-receiver .rcSmoothing-setpoint-cutoff').hide(); } - if ($(this).val() == 1) { - rcSmoothingNumberElement.val(FC.RX_CONFIG.rcSmoothingInputCutoff); - $('.tab-receiver .rcSmoothing-input-cutoff').show(); + if ($(this).val() === "1") { + rcSmoothingNumberElement.val(FC.RX_CONFIG.rcSmoothingSetpointCutoff); + $('.tab-receiver .rcSmoothing-setpoint-cutoff').show(); } }).change(); - $('.tab-receiver .rcSmoothing-derivative-cutoff').show(); - $('select[name="rcSmoothing-input-derivative-select"]').val("1"); - if (FC.RX_CONFIG.rcSmoothingDerivativeCutoff == 0) { - $('select[name="rcSmoothing-input-derivative-select"]').val("0"); - $('.tab-receiver .rcSmoothing-derivative-cutoff').hide(); + $('.tab-receiver .rcSmoothing-feedforward-cutoff').show(); + $('select[name="rcSmoothing-feedforward-select"]').val("1"); + if (FC.RX_CONFIG.rcSmoothingFeedforwardCutoff === 0) { + $('select[name="rcSmoothing-feedforward-select"]').val("0"); + $('.tab-receiver .rcSmoothing-feedforward-cutoff').hide(); } - $('select[name="rcSmoothing-input-derivative-select"]').change(function () { - if ($(this).val() == 0) { - $('.tab-receiver .rcSmoothing-derivative-cutoff').hide(); - rcSmoothingDerivativeNumberElement.val(0); + $('select[name="rcSmoothing-feedforward-select"]').change(function () { + if ($(this).val() === "0") { + $('.tab-receiver .rcSmoothing-feedforward-cutoff').hide(); + rcSmoothingFeedforwardNumberElement.val(0); } - if ($(this).val() == 1) { - $('.tab-receiver .rcSmoothing-derivative-cutoff').show(); - rcSmoothingDerivativeNumberElement.val(FC.RX_CONFIG.rcSmoothingDerivativeCutoff); + if ($(this).val() === "1") { + $('.tab-receiver .rcSmoothing-feedforward-cutoff').show(); + rcSmoothingFeedforwardNumberElement.val(FC.RX_CONFIG.rcSmoothingFeedforwardCutoff); } }).change(); - const rcSmoothingDerivativeType = $('select[name="rcSmoothingDerivativeType-select"]'); + const rcSmoothingFeedforwardType = $('select[name="rcSmoothingFeedforwardType-select"]'); if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) { - rcSmoothingDerivativeType.append($(``)); + rcSmoothingFeedforwardType.append($(``)); } - rcSmoothingDerivativeType.val(FC.RX_CONFIG.rcSmoothingDerivativeType); + rcSmoothingFeedforwardType.val(FC.RX_CONFIG.rcSmoothingDerivativeType); const rcSmoothingChannels = $('select[name="rcSmoothingChannels-select"]'); rcSmoothingChannels.val(FC.RX_CONFIG.rcInterpolationChannels); - const rcSmoothingInputType = $('select[name="rcSmoothingInputType-select"]'); - rcSmoothingInputType.val(FC.RX_CONFIG.rcSmoothingInputType); + const rcSmoothingSetpointType = $('select[name="rcSmoothingSetpointType-select"]'); + rcSmoothingSetpointType.val(FC.RX_CONFIG.rcSmoothingInputType); if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) { - $('select[name="rcSmoothing-input-manual-select"], select[name="rcSmoothing-input-derivative-select"]').change(function() { - if ($('select[name="rcSmoothing-input-manual-select"]').val() == 0 || $('select[name="rcSmoothing-input-derivative-select"]').val() == 0) { - $('.tab-receiver .rcSmoothing-auto-smoothness').show(); + $('select[name="rcSmoothing-setpoint-manual-select"], select[name="rcSmoothing-feedforward-select"]').change(function() { + if ($('select[name="rcSmoothing-setpoint-manual-select"]').val() === "0" || $('select[name="rcSmoothing-feedforward-select"]').val() === "0") { + $('.tab-receiver .rcSmoothing-auto-factor').show(); } else { - $('.tab-receiver .rcSmoothing-auto-smoothness').hide(); + $('.tab-receiver .rcSmoothing-auto-factor').hide(); } }); - $('select[name="rcSmoothing-input-manual-select"]').change(); + $('select[name="rcSmoothing-setpoint-manual-select"]').change(); - const rcSmoothingAutoSmoothness = $('input[name="rcSmoothingAutoSmoothness-number"]'); - rcSmoothingAutoSmoothness.val(FC.RX_CONFIG.rcSmoothingAutoSmoothness); + const rcSmoothingAutoFactor = $('input[name="rcSmoothingAutoFactor-number"]'); + rcSmoothingAutoFactor.val(FC.RX_CONFIG.rcSmoothingAutoFactor); } else { - $('.tab-receiver .rcSmoothing-auto-smoothness').hide(); + $('.tab-receiver .rcSmoothing-auto-factor').hide(); } updateInterpolationView(); } else { $('.tab-receiver .rcInterpolation').show(); - $('.tab-receiver .rcSmoothing-derivative-cutoff').hide(); - $('.tab-receiver .rcSmoothing-input-cutoff').hide(); - $('.tab-receiver .rcSmoothing-derivative-type').hide(); - $('.tab-receiver .rcSmoothing-input-type').hide(); - $('.tab-receiver .rcSmoothing-derivative-manual').hide(); - $('.tab-receiver .rcSmoothing-input-manual').hide(); + $('.tab-receiver .rcSmoothing-feedforward-cutoff').hide(); + $('.tab-receiver .rcSmoothing-setpoint-cutoff').hide(); + $('.tab-receiver .rcSmoothing-feedforward-type').hide(); + $('.tab-receiver .rcSmoothing-setpoint-type').hide(); + $('.tab-receiver .rcSmoothing-feedforward-manual').hide(); + $('.tab-receiver .rcSmoothing-setpoint-manual').hide(); $('.tab-receiver .rc-smoothing-type').hide(); - $('.tab-receiver .rcSmoothing-auto-smoothness').hide(); - } - - if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) { - $('.tab-receiver .rcSmoothing-derivative-type').hide(); - $('.tab-receiver .rcSmoothing-input-type').hide(); - $('.tab-receiver input[name="rcSmoothingAutoSmoothness-number"]').attr("max", "250"); + $('.tab-receiver .rcSmoothing-auto-factor').hide(); } // Only show the MSP control sticks if the MSP Rx feature is enabled @@ -865,33 +866,56 @@ TABS.receiver.updateRcInterpolationParameters = function () { }; function updateInterpolationView() { + const smoothingOnOff = ((semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) ? + FC.RX_CONFIG.rcSmoothingMode : FC.RX_CONFIG.rcSmoothingType); + $('.tab-receiver .rcInterpolation').hide(); - $('.tab-receiver .rcSmoothing-derivative-cutoff').show(); - $('.tab-receiver .rcSmoothing-input-cutoff').show(); - $('.tab-receiver .rcSmoothing-derivative-type').show(); - $('.tab-receiver .rcSmoothing-input-type').show(); - $('.tab-receiver .rcSmoothing-derivative-manual').show(); - $('.tab-receiver .rcSmoothing-input-manual').show(); + $('.tab-receiver .rcSmoothing-feedforward-cutoff').show(); + $('.tab-receiver .rcSmoothing-setpoint-cutoff').show(); + $('.tab-receiver .rcSmoothing-feedforward-type').show(); + $('.tab-receiver .rcSmoothing-setpoint-type').show(); + $('.tab-receiver .rcSmoothing-feedforward-manual').show(); + $('.tab-receiver .rcSmoothing-setpoint-manual').show(); if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) { - if (FC.RX_CONFIG.rcSmoothingDerivativeCutoff == 0 || FC.RX_CONFIG.rcSmoothingInputCutoff == 0) { - $('.tab-receiver .rcSmoothing-auto-smoothness').show(); + if (FC.RX_CONFIG.rcSmoothingFeedforwardCutoff === 0 || FC.RX_CONFIG.rcSmoothingSetpointCutoff === 0) { + $('.tab-receiver .rcSmoothing-auto-factor').show(); } } - if (FC.RX_CONFIG.rcSmoothingType == 0) { - $('.tab-receiver .rcInterpolation').show(); - $('.tab-receiver .rcSmoothing-derivative-cutoff').hide(); - $('.tab-receiver .rcSmoothing-input-cutoff').hide(); - $('.tab-receiver .rcSmoothing-derivative-type').hide(); - $('.tab-receiver .rcSmoothing-input-type').hide(); - $('.tab-receiver .rcSmoothing-derivative-manual').hide(); - $('.tab-receiver .rcSmoothing-input-manual').hide(); - $('.tab-receiver .rcSmoothing-auto-smoothness').hide(); + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) { + $('.tab-receiver .rcSmoothing-feedforward-type').hide(); + $('.tab-receiver .rcSmoothing-setpoint-type').hide(); + $('.tab-receiver .rc-smoothing-channels').hide(); + $('.tab-receiver input[name="rcSmoothingAutoFactor-number"]').attr("max", "250"); + $('.tab-receiver .rcSmoothingType').hide(); + $('.rcSmoothingOff').text('OFF'); + $('.rcSmoothingOn').text('ON'); + } else { + $('.tab-receiver .rcSmoothingMode').hide(); } - if (FC.RX_CONFIG.rcSmoothingDerivativeCutoff == 0) { - $('.tab-receiver .rcSmoothing-derivative-cutoff').hide(); + + if (smoothingOnOff === 0) { + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) { + $('.tab-receiver .rcSmoothing-feedforward-cutoff').hide(); + $('.tab-receiver .rcSmoothing-setpoint-cutoff').hide(); + $('.tab-receiver .rcSmoothing-feedforward-manual').hide(); + $('.tab-receiver .rcSmoothing-setpoint-manual').hide(); + $('.tab-receiver .rcSmoothing-auto-factor').hide(); + } else { + $('.tab-receiver .rcInterpolation').show(); + $('.tab-receiver .rcSmoothing-feedforward-cutoff').hide(); + $('.tab-receiver .rcSmoothing-setpoint-cutoff').hide(); + $('.tab-receiver .rcSmoothing-feedforward-type').hide(); + $('.tab-receiver .rcSmoothing-setpoint-type').hide(); + $('.tab-receiver .rcSmoothing-feedforward-manual').hide(); + $('.tab-receiver .rcSmoothing-setpoint-manual').hide(); + $('.tab-receiver .rcSmoothing-auto-factor').hide(); + } } - if (FC.RX_CONFIG.rcSmoothingInputCutoff == 0) { - $('.tab-receiver .rcSmoothing-input-cutoff').hide(); + if (FC.RX_CONFIG.rcSmoothingFeedforwardCutoff === 0) { + $('.tab-receiver .rcSmoothing-feedforward-cutoff').hide(); + } + if (FC.RX_CONFIG.rcSmoothingSetpointCutoff === 0) { + $('.tab-receiver .rcSmoothing-setpoint-cutoff').hide(); } } diff --git a/src/tabs/receiver.html b/src/tabs/receiver.html index 7279f78a..90ea4f56 100644 --- a/src/tabs/receiver.html +++ b/src/tabs/receiver.html @@ -156,15 +156,18 @@
-
@@ -186,9 +189,9 @@ - + - @@ -196,28 +199,28 @@
-
+
- - - + + +
-
+
- + - @@ -225,17 +228,17 @@
-
+
- + - @@ -243,29 +246,29 @@
-
+
- - - + + +
-
+
- + - + @@ -273,27 +276,27 @@
-
+
- + - +
-
+