Skip to content

Commit e734c11

Browse files
committed
move code to pidtuning.js
1 parent 0bef390 commit e734c11

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/js/TuningSliders.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,6 @@ TuningSliders.updatePidSlidersDisplay = function() {
405405
});
406406
});
407407

408-
if ($('input[id="useIntegratedYaw"]').is(':checked')) {
409-
this.pidSlidersUnavailable = true;
410-
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
411-
this.sliderPidsMode = 0;
412-
$('#pid_main .pid_data input').prop('disabled', false);
413-
}
414-
}
415-
416408
if (!this.pidSlidersUnavailable) {
417409
this.cachedPidSliderValues = true;
418410
}

src/js/tabs/pid_tuning.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,10 @@ TABS.pid_tuning.initialize = function (callback) {
547547

548548
$('input[id="useIntegratedYaw"]').change(function() {
549549
const checked = $(this).is(':checked');
550+
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
551+
this.sliderPidsMode = 0;
552+
}
553+
$('#pid_main .pid_data input').prop('disabled', !checked);
550554
$('#pidTuningIntegratedYawCaution').toggle(checked);
551555
}).change();
552556

0 commit comments

Comments
 (0)