Merge pull request #189 from mikeller/make_rc_interpolation_interval_dynamic
Made display of rcInterpolationInterval dynamic.10.3.x-maintenance
commit
7934d78e5f
|
@ -76,6 +76,8 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
$('input[name="dtermSetpoint-number"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
|
$('input[name="dtermSetpoint-number"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
|
||||||
$('input[name="dtermSetpoint-range"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
|
$('input[name="dtermSetpoint-range"]').val(ADVANCED_TUNING.dtermSetpointWeight / 100);
|
||||||
|
|
||||||
|
self.updateRcInterpolationParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill in the data from PIDs array
|
// Fill in the data from PIDs array
|
||||||
|
@ -558,10 +560,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
$('#pid-tuning .dtermSetpoint').hide();
|
$('#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")) {
|
if (!semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
||||||
$('#pid-tuning .delta').hide();
|
$('#pid-tuning .delta').hide();
|
||||||
$('.tab-pid_tuning .note').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 () {
|
pidController_e.change(function () {
|
||||||
self.setDirty(true);
|
self.setDirty(true);
|
||||||
|
|
||||||
self.updatePidControllerParameters();
|
self.updatePidControllerParameters();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, "2.8.2")) {
|
if (semver.gte(CONFIG.flightControllerVersion, "3.0.0")) {
|
||||||
$('#pid-tuning .delta select').change(function() {
|
$('select[name="rcInterpolation-select"]').change(function () {
|
||||||
self.setDirty(true);
|
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…
Reference in New Issue