1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 17:55:24 +03:00

Auto merged - #2618 at Wed, 06 Oct 2021 12:17:10 GMT

Expert mode toggle bugfix and refactoring
This commit is contained in:
J Blackman 2021-10-06 23:17:10 +11:00 committed by GitHub
commit 3feefcb184
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 7 deletions

View file

@ -111,7 +111,7 @@ TuningSliders.initialize = function() {
this.setDMinFeatureEnabled($('#dMinSwitch').is(':checked'));
}
this.setExpertMode($('input[name="expertModeCheckbox"]').is(':checked'));
this.setExpertMode(isExpertModeEnabled());
this.initPidSlidersPosition();
this.initGyroFilterSliderPosition();
@ -126,8 +126,8 @@ TuningSliders.initialize = function() {
this.updateFilterSlidersDisplay();
};
TuningSliders.setExpertMode = function() {
this.expertMode = isExpertModeEnabled();
TuningSliders.setExpertMode = function(expertModeEnabled) {
this.expertMode = expertModeEnabled;
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
document.getElementById('sliderDMaxGain').disabled = !this.expertMode;