mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 00:05:22 +03:00
fix msp tuning sliders version
This commit is contained in:
parent
8591526b66
commit
fb0658828b
1 changed files with 5 additions and 5 deletions
|
@ -58,7 +58,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
return MSP.promise(MSPCodes.MSP_MOTOR_CONFIG);
|
return MSP.promise(MSPCodes.MSP_MOTOR_CONFIG);
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
let promise;
|
let promise;
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
promise = MSP.promise(MSPCodes.MSP_TUNING_SLIDERS);
|
promise = MSP.promise(MSPCodes.MSP_TUNING_SLIDERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -981,7 +981,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
FC.ADVANCED_TUNING.thrustLinearization = $('input[id="thrustLinearization"]').is(':checked') ? parseInt($('input[name="thrustLinearValue"]').val()) : 0;
|
FC.ADVANCED_TUNING.thrustLinearization = $('input[id="thrustLinearization"]').is(':checked') ? parseInt($('input[name="thrustLinearValue"]').val()) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
FC.TUNING_SLIDERS.slider_pids_mode = parseInt($('#sliderPidsModeSelect').val());
|
FC.TUNING_SLIDERS.slider_pids_mode = parseInt($('#sliderPidsModeSelect').val());
|
||||||
FC.TUNING_SLIDERS.slider_master_multiplier = TuningSliders.sliderMasterMultiplier * 100;
|
FC.TUNING_SLIDERS.slider_master_multiplier = TuningSliders.sliderMasterMultiplier * 100;
|
||||||
FC.TUNING_SLIDERS.slider_roll_pitch_ratio = TuningSliders.sliderRollPitchRatio * 100;
|
FC.TUNING_SLIDERS.slider_roll_pitch_ratio = TuningSliders.sliderRollPitchRatio * 100;
|
||||||
|
@ -1798,8 +1798,8 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
const NON_EXPERT_SLIDER_MAX = 1.25;
|
const NON_EXPERT_SLIDER_MAX = 1.25;
|
||||||
const NON_EXPERT_SLIDER_MIN = 0.7;
|
const NON_EXPERT_SLIDER_MIN = 0.7;
|
||||||
|
|
||||||
const SLIDER_STEP_LOWER = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43) ? 0.005 : 0.05;
|
const SLIDER_STEP_LOWER = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44) ? 0.005 : 0.05;
|
||||||
const SLIDER_STEP_UPPER = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43) ? 0.01 : 0.1;
|
const SLIDER_STEP_UPPER = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44) ? 0.01 : 0.1;
|
||||||
|
|
||||||
$('#sliderPidsModeSelect').val(FC.TUNING_SLIDERS.slider_pids_mode);
|
$('#sliderPidsModeSelect').val(FC.TUNING_SLIDERS.slider_pids_mode);
|
||||||
|
|
||||||
|
@ -2015,7 +2015,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
return MSP.promise(MSPCodes.MSP_SET_FEATURE_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_FEATURE_CONFIG));
|
return MSP.promise(MSPCodes.MSP_SET_FEATURE_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_FEATURE_CONFIG));
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
let promise;
|
let promise;
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
promise = MSP.promise(MSPCodes.MSP_SET_TUNING_SLIDERS, mspHelper.crunch(MSPCodes.MSP_SET_TUNING_SLIDERS));
|
promise = MSP.promise(MSPCodes.MSP_SET_TUNING_SLIDERS, mspHelper.crunch(MSPCodes.MSP_SET_TUNING_SLIDERS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue