1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-21 15:25:22 +03:00

Add iterm relax cutoff to UI

This commit is contained in:
IvoFPV 2019-08-07 22:02:53 +02:00
parent 3eb39d716c
commit 1fb5c046f4
6 changed files with 32 additions and 2 deletions

View file

@ -203,6 +203,7 @@ TABS.pid_tuning.initialize = function (callback) {
itermRelaxCheck.prop('checked', ADVANCED_TUNING.itermRelax !== 0);
$('select[id="itermrelaxAxes"]').val(ADVANCED_TUNING.itermRelax > 0 ? ADVANCED_TUNING.itermRelax : 1);
$('select[id="itermrelaxType"]').val(ADVANCED_TUNING.itermRelaxType);
$('input[name="itermRelaxCutoff"]').val(ADVANCED_TUNING.itermRelaxCutoff);
itermRelaxCheck.change(function() {
var checked = $(this).is(':checked');
@ -350,6 +351,9 @@ TABS.pid_tuning.initialize = function (callback) {
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
$('.smartfeedforward').hide();
$('.itermRelaxCutoff').show();
} else {
$('.itermRelaxCutoff').hide();
}
$('input[id="useIntegratedYaw"]').change(function() {
@ -638,6 +642,7 @@ TABS.pid_tuning.initialize = function (callback) {
ADVANCED_TUNING.itermRelax = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxAxes"]').val() : 0;
ADVANCED_TUNING.itermRelaxType = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxType"]').val() : 0;
ADVANCED_TUNING.itermRelaxCutoff = parseInt($('input[name="itermRelaxCutoff"]').val());
ADVANCED_TUNING.absoluteControlGain = $('input[name="absoluteControlGain-number"]').val();