diff options
author | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2019-11-22 15:34:51 +0300 |
---|---|---|
committer | Pawel Spychalski (DzikuVx) <pspychalski@gmail.com> | 2019-11-22 15:34:51 +0300 |
commit | 21c8c856f941594579be4de074698f8f1bfcce0c (patch) | |
tree | 594e611dc690e33beef324bb5fa4f7d0ea2895e2 | |
parent | 28bb794dff8dacb7601a38f41ac8dc5cfc62fe42 (diff) |
Improved filters
-rwxr-xr-x | tabs/pid_tuning.html | 8 | ||||
-rwxr-xr-x | tabs/pid_tuning.js | 12 |
2 files changed, 17 insertions, 3 deletions
diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index 8d96ac2d..fab4455e 100755 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -276,6 +276,14 @@ <div class="cf_column"> <table class="rate-tpa rate-tpa--filtering"> <tbody> + <tr> + <th>Gyro Dynamic Filters</th> + <td> + <div style="padding-left: 1em; line-height: 28px;"> + <input type="checkbox" data-bit="5" class="feature toggle" name="DYNAMIC_FILTERS" title="DYNAMIC_FILTERS" id="feature-5"> + </div> + </td> + </tr> <tr class="requires-v2_2"> <th data-i18n="gyro_lpf_type"></th> <td> diff --git a/tabs/pid_tuning.js b/tabs/pid_tuning.js index dcf24ee6..04e5f309 100755 --- a/tabs/pid_tuning.js +++ b/tabs/pid_tuning.js @@ -1,4 +1,4 @@ -/*global chrome*/ +/*global chrome,helper,mspHelper*/ 'use strict'; TABS.pid_tuning = { @@ -14,7 +14,8 @@ TABS.pid_tuning.initialize = function (callback) { mspHelper.loadPidData, mspHelper.loadINAVPidConfig, mspHelper.loadPidAdvanced, - mspHelper.loadFilterConfig + mspHelper.loadFilterConfig, + mspHelper.loadBfConfig ]; loadChain.push(mspHelper.loadRateProfileData); @@ -108,6 +109,7 @@ TABS.pid_tuning.initialize = function (callback) { localize(); helper.tabs.init($('.tab-pid_tuning')); + helper.features.updateUI($('.tab-pid_tuning'), BF_CONFIG.features); hideUnusedPids(CONFIG.activeSensors); @@ -224,7 +226,11 @@ TABS.pid_tuning.initialize = function (callback) { }); } - mspHelper.savePidData(send_rc_tuning_changes); + helper.features.reset(); + helper.features.fromUI($('.tab-pid_tuning')); + helper.features.execute(function () { + mspHelper.savePidData(send_rc_tuning_changes); + }); }); GUI.content_ready(callback); |