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

Added a const for No average value

This commit is contained in:
Asizon 2020-10-03 07:31:47 +02:00
parent 77c55fe647
commit 711e4a6dd0

View file

@ -461,9 +461,10 @@ TABS.pid_tuning.initialize = function (callback) {
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
// FF Interpolate
const ffInterpolateCheck = $('input[id="ffInterpolateSp"]');
const NO_AVERAGE = 1;
ffInterpolateCheck.prop('checked', FC.ADVANCED_TUNING.ff_interpolate_sp !== 0);
$('select[id="ffInterpolate"]').val(FC.ADVANCED_TUNING.ff_interpolate_sp > 0 ? FC.ADVANCED_TUNING.ff_interpolate_sp : 1);
$('select[id="ffInterpolate"]').val(FC.ADVANCED_TUNING.ff_interpolate_sp > 0 ? FC.ADVANCED_TUNING.ff_interpolate_sp : NO_AVERAGE);
$('input[name="ffSmoothFactor"]').val(FC.ADVANCED_TUNING.ff_smooth_factor);
$('input[name="ffBoost"]').val(FC.ADVANCED_TUNING.ff_boost);