mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 14:55:15 +03:00
Adjust dmin limit logic
Previously dmin values would reset to 0 if the user decreased the D value below the current setting for dmin on a given axis. Now adjust the max for the dmin value to be D - 1 and set the dmin value to that. Prevents unexpected resets of dmin to 0 when adjusting the D gains.
This commit is contained in:
parent
2c7d47bbdc
commit
00c55d7fb5
1 changed files with 4 additions and 3 deletions
|
@ -357,11 +357,12 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
var dValue = parseInt(dElement.val());
|
||||
var dMinValue = parseInt(dMinElement.val());
|
||||
|
||||
if (dMinValue >= dValue) {
|
||||
dMinElement.val(0);
|
||||
var dMinLimit = dValue > 0 ? dValue - 1 : 0;
|
||||
if (dMinValue > dMinLimit) {
|
||||
dMinElement.val(dMinLimit);
|
||||
}
|
||||
|
||||
dMinElement.attr("max", dValue > 0? dValue - 1 : 0);
|
||||
dMinElement.attr("max", dMinLimit);
|
||||
}
|
||||
|
||||
$('.pid_tuning .ROLL input[name="d"]').change(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue