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

Expert mode toggle refactoring

This commit is contained in:
Ivan Efimov 2021-10-02 03:16:46 -05:00
parent 4583ad4a0d
commit b63c02673a
3 changed files with 16 additions and 7 deletions

View file

@ -115,7 +115,7 @@ TuningSliders.initialize = function() {
this.setDMinFeatureEnabled($('#dMinSwitch').is(':checked'));
}
this.setExpertMode($('input[name="expertModeCheckbox"]').is(':checked'));
this.setExpertMode(isExpertModeEnabled());
this.initPidSlidersPosition();
this.initGyroFilterSliderPosition();
@ -130,8 +130,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;