From da02712bea2173228d0afa304c4e00c6d719ecd3 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Thu, 13 Oct 2016 13:05:41 +1300 Subject: [PATCH] Hide gyro notch filter 2 settings for firmware < 3.0.1. --- tabs/pid_tuning.html | 4 ++-- tabs/pid_tuning.js | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 579e2110..1756967f 100755 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -468,7 +468,7 @@ - + @@ -481,7 +481,7 @@ - + diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index 19ee2962..22587e47 100755 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -257,13 +257,16 @@ TABS.pid_tuning.initialize = function (callback) { $('input[name="dtermSetpoint-number"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100); $('input[name="dtermSetpoint-range"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100); - if (semver.gte(CONFIG.flightControllerVersion, '3.0.1')) { - $('.pid_filter input[name="gyroNotch2Frequency"]').val(FILTER_CONFIG.gyro_soft_notch_hz_2); - $('.pid_filter input[name="gyroNotch2Cutoff"]').val(FILTER_CONFIG.gyro_soft_notch_cutoff_2); - } } else { $('.pid_filter .newFilter').hide(); } + + if (semver.gte(CONFIG.flightControllerVersion, '3.0.1')) { + $('.pid_filter input[name="gyroNotch2Frequency"]').val(FILTER_CONFIG.gyro_soft_notch_hz_2); + $('.pid_filter input[name="gyroNotch2Cutoff"]').val(FILTER_CONFIG.gyro_soft_notch_cutoff_2); + } else { + $('.pid_filter .gyroNotch2').hide(); + } } function form_to_pid_and_rc() {