From 637cc28f26ea5b3525203322b895076629b0e681 Mon Sep 17 00:00:00 2001 From: Miguel Angel Mulero Martinez Date: Sat, 16 Jun 2018 08:47:12 +0200 Subject: [PATCH] Use defaults for notch cutoffs --- src/js/tabs/pid_tuning.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/tabs/pid_tuning.js b/src/js/tabs/pid_tuning.js index d123c50e..85d3d1ae 100755 --- a/src/js/tabs/pid_tuning.js +++ b/src/js/tabs/pid_tuning.js @@ -306,7 +306,7 @@ TABS.pid_tuning.initialize = function (callback) { $('.pid_filter input[name="gyroNotch1Frequency"]').val(checked ? hz : 0).attr('disabled', !checked) .attr("min", checked ? 1 : 0).change(); - $('.pid_filter input[name="gyroNotch1Cutoff"]').attr('disabled', !checked); + $('.pid_filter input[name="gyroNotch1Cutoff"]').val(checked ? cutoff : 0).attr('disabled', !checked).change(); }); $('input[id="gyroNotch2Enabled"]').change(function() { @@ -316,7 +316,7 @@ TABS.pid_tuning.initialize = function (callback) { $('.pid_filter input[name="gyroNotch2Frequency"]').val(checked ? hz : 0).attr('disabled', !checked) .attr("min", checked ? 1 : 0).change(); - $('.pid_filter input[name="gyroNotch2Cutoff"]').attr('disabled', !checked); + $('.pid_filter input[name="gyroNotch2Cutoff"]').val(checked ? cutoff : 0).attr('disabled', !checked).change(); }); $('input[id="dtermNotchEnabled"]').change(function() { @@ -326,7 +326,7 @@ TABS.pid_tuning.initialize = function (callback) { $('.pid_filter input[name="dTermNotchFrequency"]').val(checked ? hz : 0).attr('disabled', !checked) .attr("min", checked ? 1 : 0).change(); - $('.pid_filter input[name="dTermNotchCutoff"]').attr('disabled', !checked); + $('.pid_filter input[name="dTermNotchCutoff"]').val(checked ? cutoff : 0).attr('disabled', !checked).change(); }); $('input[id="gyroLowpassEnabled"]').change(function() {