1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-21 15:25:22 +03:00

Adjust dmin limit logic (#1382)

Adjust dmin limit logic
This commit is contained in:
Michael Keller 2019-04-29 01:26:44 +12:00 committed by GitHub
commit b4930064a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -361,11 +361,12 @@ TABS.pid_tuning.initialize = function (callback) {
var dValue = parseInt(dElement.val()); var dValue = parseInt(dElement.val());
var dMinValue = parseInt(dMinElement.val()); var dMinValue = parseInt(dMinElement.val());
if (dMinValue >= dValue) { var dMinLimit = dValue > 0 ? dValue - 1 : 0;
dMinElement.val(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() { $('.pid_tuning .ROLL input[name="d"]').change(function() {