mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 23:05:15 +03:00
Merge pull request #2005 from Asizon/fix_antigravity_gain
This commit is contained in:
commit
41a8281efe
1 changed files with 7 additions and 3 deletions
|
@ -181,9 +181,13 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
antiGravitySwitch.change(function() {
|
||||
var checked = $(this).is(':checked');
|
||||
if (checked) {
|
||||
const MAX_ACCELERATOR_GAIN = semver.gte(CONFIG.apiVersion, API_VERSION_1_43) ? 3.5 : 1.1;
|
||||
const itermAcceleratorGain = Math.max(ADVANCED_TUNING.itermAcceleratorGain / 1000, MAX_ACCELERATOR_GAIN);
|
||||
if (ADVANCED_TUNING.itermAcceleratorGain === 1000) {
|
||||
const DEFAULT_ACCELERATOR_GAIN = semver.gte(CONFIG.apiVersion, API_VERSION_1_43) ? 3.5 : 1.1;
|
||||
$('.antigravity input[name="itermAcceleratorGain"]').val(DEFAULT_ACCELERATOR_GAIN);
|
||||
} else {
|
||||
const itermAcceleratorGain = (ADVANCED_TUNING.itermAcceleratorGain / 1000);
|
||||
$('.antigravity input[name="itermAcceleratorGain"]').val(itermAcceleratorGain);
|
||||
}
|
||||
$('.antigravity .suboption').show();
|
||||
if (ADVANCED_TUNING.antiGravityMode == 0) {
|
||||
$('.antigravity .antiGravityThres').hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue