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

Improved new PID defaults Sliders reading

This commit is contained in:
Asizon 2020-04-07 13:15:52 +02:00
parent a74701aafe
commit a9530fd5fc
2 changed files with 7 additions and 4 deletions

View file

@ -26,10 +26,6 @@ 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'));

View file

@ -692,6 +692,13 @@ var FC = {
getPidDefaults: function() { getPidDefaults: function() {
var versionPidDefaults = DEFAULT_PIDS; var versionPidDefaults = DEFAULT_PIDS;
// if defaults change they should go here // if defaults change they should go here
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
versionPidDefaults = [
42, 85, 35, 23, 90,
46, 90, 38, 25, 95,
30, 90, 0, 0, 90,
];
}
return versionPidDefaults; return versionPidDefaults;
}, },
}; };