mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 22:35:17 +03:00
Dmin set per default ratio
This commit is contained in:
parent
72b00c1d91
commit
61d0b1e857
2 changed files with 10 additions and 4 deletions
|
@ -1478,7 +1478,7 @@
|
||||||
"description": "Table header of the D Min feature in the PIDs tab"
|
"description": "Table header of the D Min feature in the PIDs tab"
|
||||||
},
|
},
|
||||||
"pidTuningDMinDisabledNote": {
|
"pidTuningDMinDisabledNote": {
|
||||||
"message": "<strong>Note:</strong> D Min feature is disabled and its paramaters are hidden. To use D Min please enable it in $t(pidTuningPidSettings.message)."
|
"message": "<strong>Note:</strong> D Min feature is disabled and its parameters are hidden. To use D Min please enable it in $t(pidTuningPidSettings.message)."
|
||||||
},
|
},
|
||||||
"pidTuningDMinGain": {
|
"pidTuningDMinGain": {
|
||||||
"message": "Gain",
|
"message": "Gain",
|
||||||
|
|
|
@ -397,9 +397,15 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
dMinSwitch.change(function() {
|
dMinSwitch.change(function() {
|
||||||
var checked = $(this).is(':checked');
|
var checked = $(this).is(':checked');
|
||||||
if (checked) {
|
if (checked) {
|
||||||
$('.pid_tuning input[name="dMinRoll"]').val(ADVANCED_TUNING.dMinRoll);
|
if (ADVANCED_TUNING.dMinRoll == 0 && ADVANCED_TUNING.dMinPitch == 0 && ADVANCED_TUNING.dMinYaw == 0) {
|
||||||
$('.pid_tuning input[name="dMinPitch"]').val(ADVANCED_TUNING.dMinPitch);
|
$('.pid_tuning input[name="dMinRoll"]').val(Math.round(PIDs[0][2] * 0.57));
|
||||||
$('.pid_tuning input[name="dMinYaw"]').val(ADVANCED_TUNING.dMinYaw);
|
$('.pid_tuning input[name="dMinPitch"]').val(Math.round(PIDs[1][2] * 0.57));
|
||||||
|
$('.pid_tuning input[name="dMinYaw"]').val(Math.round(PIDs[2][2] * 0.57));
|
||||||
|
} else {
|
||||||
|
$('.pid_tuning input[name="dMinRoll"]').val(ADVANCED_TUNING.dMinRoll);
|
||||||
|
$('.pid_tuning input[name="dMinPitch"]').val(ADVANCED_TUNING.dMinPitch);
|
||||||
|
$('.pid_tuning input[name="dMinYaw"]').val(ADVANCED_TUNING.dMinYaw);
|
||||||
|
}
|
||||||
$('.dMinDisabledNote').hide();
|
$('.dMinDisabledNote').hide();
|
||||||
$('.dminGroup .suboption').show();
|
$('.dminGroup .suboption').show();
|
||||||
$('#pid_main tr :nth-child(5)').show();
|
$('#pid_main tr :nth-child(5)').show();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue