mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 14:55:15 +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"
|
||||
},
|
||||
"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": {
|
||||
"message": "Gain",
|
||||
|
|
|
@ -397,9 +397,15 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
dMinSwitch.change(function() {
|
||||
var checked = $(this).is(':checked');
|
||||
if (checked) {
|
||||
$('.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);
|
||||
if (ADVANCED_TUNING.dMinRoll == 0 && ADVANCED_TUNING.dMinPitch == 0 && ADVANCED_TUNING.dMinYaw == 0) {
|
||||
$('.pid_tuning input[name="dMinRoll"]').val(Math.round(PIDs[0][2] * 0.57));
|
||||
$('.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();
|
||||
$('.dminGroup .suboption').show();
|
||||
$('#pid_main tr :nth-child(5)').show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue