mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-18 22:05:13 +03:00
Better defaults read
This commit is contained in:
parent
19d4db4346
commit
064f7ba5d8
2 changed files with 5 additions and 8 deletions
|
@ -26,6 +26,10 @@ var TuningSliders = {
|
||||||
|
|
||||||
TuningSliders.initialize = function() {
|
TuningSliders.initialize = function() {
|
||||||
this.PID_DEFAULT = FC.getPidDefaults();
|
this.PID_DEFAULT = FC.getPidDefaults();
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
|
||||||
|
this.PID_DEFAULT[3] = 23;
|
||||||
|
this.PID_DEFAULT[8] = 25;
|
||||||
|
}
|
||||||
this.FILTER_DEFAULT = FC.getFilterDefaults();
|
this.FILTER_DEFAULT = FC.getFilterDefaults();
|
||||||
|
|
||||||
this.setDMinFeatureEnabled($('#dMinSwitch').is(':checked'));
|
this.setDMinFeatureEnabled($('#dMinSwitch').is(':checked'));
|
||||||
|
|
|
@ -690,15 +690,8 @@ var FC = {
|
||||||
},
|
},
|
||||||
|
|
||||||
getPidDefaults: function() {
|
getPidDefaults: function() {
|
||||||
// if defaults change they should go here
|
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
|
|
||||||
DEFAULT_PIDS = [
|
|
||||||
42, 85, 35, 23, 90,
|
|
||||||
46, 90, 38, 25, 95,
|
|
||||||
30, 90, 0, 0, 90,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
var versionPidDefaults = DEFAULT_PIDS;
|
var versionPidDefaults = DEFAULT_PIDS;
|
||||||
|
// if defaults change they should go here
|
||||||
return versionPidDefaults;
|
return versionPidDefaults;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue