mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Made display of rcInterpolationInterval dynamic.
This commit is contained in:
parent
02d4811f64
commit
3ded21c22f
1 changed files with 21 additions and 7 deletions
|
@ -76,6 +76,8 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
|
||||
$('input[name="dtermSetpoint-number"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
|
||||
$('input[name="dtermSetpoint-range"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
|
||||
|
||||
self.updateRcInterpolationParameters();
|
||||
}
|
||||
|
||||
// Fill in the data from PIDs array
|
||||
|
@ -558,10 +560,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
$('#pid-tuning .dtermSetpoint').hide();
|
||||
}
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "3.0.0") && RX_CONFIG.rcInterpolation < 3) {
|
||||
$('#pid-tuning .rcInterpolationInterval').hide();
|
||||
}
|
||||
|
||||
if (!semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||
$('#pid-tuning .delta').hide();
|
||||
$('.tab-pid_tuning .note').hide();
|
||||
|
@ -764,15 +762,21 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
}
|
||||
});
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||
$('#pid-tuning .delta select').change(function() {
|
||||
self.setDirty(true);
|
||||
});
|
||||
}
|
||||
|
||||
pidController_e.change(function () {
|
||||
self.setDirty(true);
|
||||
|
||||
self.updatePidControllerParameters();
|
||||
});
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||
$('#pid-tuning .delta select').change(function() {
|
||||
self.setDirty(true);
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "3.0.0")) {
|
||||
$('select[name="rcInterpolation-select"]').change(function () {
|
||||
self.updateRcInterpolationParameters();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -974,3 +978,13 @@ TABS.pid_tuning.updatePidControllerParameters = function () {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
TABS.pid_tuning.updateRcInterpolationParameters = function () {
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "3.0.0")) {
|
||||
if ($('select[name="rcInterpolation-select"]').val() === '3') {
|
||||
$('#pid-tuning .rcInterpolationInterval').show();
|
||||
} else {
|
||||
$('#pid-tuning .rcInterpolationInterval').hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue