mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 17:25:16 +03:00
Fix receiver provider order (#3140)
* Fix receiver provider order * Fix rates preview and throttle rates preview
This commit is contained in:
parent
f0cdf83de1
commit
44684cb8d0
3 changed files with 8 additions and 16 deletions
|
@ -723,8 +723,8 @@ const FC = {
|
||||||
'XBUS_MODE_B',
|
'XBUS_MODE_B',
|
||||||
'XBUS_MODE_B_RJ01',
|
'XBUS_MODE_B_RJ01',
|
||||||
'IBUS',
|
'IBUS',
|
||||||
'CRSF',
|
|
||||||
'JETIEXBUS',
|
'JETIEXBUS',
|
||||||
|
'CRSF',
|
||||||
'SPEKTRUM2048/SRXL',
|
'SPEKTRUM2048/SRXL',
|
||||||
'TARGET_CUSTOM',
|
'TARGET_CUSTOM',
|
||||||
'FrSky FPort',
|
'FrSky FPort',
|
||||||
|
|
|
@ -56,7 +56,7 @@ pid_tuning.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return promise;
|
return promise;
|
||||||
})
|
})
|
||||||
.then(() => MSP.send_message(MSPCodes.MSP_MIXER_CONFIG, false, false, load_html));
|
.then(() => MSP.send_message(MSPCodes.MSP_MIXER_CONFIG, false, false, load_html));
|
||||||
|
|
||||||
function load_html() {
|
function load_html() {
|
||||||
|
@ -97,7 +97,6 @@ pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) {
|
||||||
// Moved tpa to profile
|
// Moved tpa to profile
|
||||||
$('select[id="tpaMode"]').val(FC.ADVANCED_TUNING.tpaMode);
|
|
||||||
$('input[id="tpaRate"]').val(FC.ADVANCED_TUNING.tpaRate.toFixed(2));
|
$('input[id="tpaRate"]').val(FC.ADVANCED_TUNING.tpaRate.toFixed(2));
|
||||||
$('input[id="tpaBreakpoint"]').val(FC.ADVANCED_TUNING.tpaBreakpoint);
|
$('input[id="tpaBreakpoint"]').val(FC.ADVANCED_TUNING.tpaBreakpoint);
|
||||||
} else {
|
} else {
|
||||||
|
@ -105,9 +104,6 @@ pid_tuning.initialize = function (callback) {
|
||||||
$('.tpa-old input[name="tpa-breakpoint"]').val(FC.RC_TUNING.dynamic_THR_breakpoint);
|
$('.tpa-old input[name="tpa-breakpoint"]').val(FC.RC_TUNING.dynamic_THR_breakpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.pid_tuning input[name="rc_yaw_expo"]').hide();
|
|
||||||
$('.pid_tuning input[name="rc_expo"]').attr("rowspan", "3");
|
|
||||||
|
|
||||||
$('.vbatpidcompensation').toggle(vbatpidcompensationIsUsed);
|
$('.vbatpidcompensation').toggle(vbatpidcompensationIsUsed);
|
||||||
$('input[id="vbatpidcompensation"]').prop('checked', FC.ADVANCED_TUNING.vbatPidCompensation !== 0);
|
$('input[id="vbatpidcompensation"]').prop('checked', FC.ADVANCED_TUNING.vbatPidCompensation !== 0);
|
||||||
|
|
||||||
|
@ -118,11 +114,7 @@ pid_tuning.initialize = function (callback) {
|
||||||
$('.pid_filter input[name="dtermLowpassFrequency"]').val(FC.FILTER_CONFIG.dterm_lowpass_hz);
|
$('.pid_filter input[name="dtermLowpassFrequency"]').val(FC.FILTER_CONFIG.dterm_lowpass_hz);
|
||||||
$('.pid_filter input[name="yawLowpassFrequency"]').val(FC.FILTER_CONFIG.yaw_lowpass_hz);
|
$('.pid_filter input[name="yawLowpassFrequency"]').val(FC.FILTER_CONFIG.yaw_lowpass_hz);
|
||||||
|
|
||||||
if (FC.FEATURE_CONFIG.features.isEnabled('SUPEREXPO_RATES')) {
|
$('#pid-tuning .rate').text(i18n.getMessage("pidTuningSuperRate"));
|
||||||
$('#pid-tuning .rate').text(i18n.getMessage("pidTuningSuperRate"));
|
|
||||||
} else {
|
|
||||||
$('#pid-tuning .rate').text(i18n.getMessage("pidTuningRate"));
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.pid_filter input[name="gyroNotch1Frequency"]').val(FC.FILTER_CONFIG.gyro_notch_hz);
|
$('.pid_filter input[name="gyroNotch1Frequency"]').val(FC.FILTER_CONFIG.gyro_notch_hz);
|
||||||
$('.pid_filter input[name="gyroNotch1Cutoff"]').val(FC.FILTER_CONFIG.gyro_notch_cutoff);
|
$('.pid_filter input[name="gyroNotch1Cutoff"]').val(FC.FILTER_CONFIG.gyro_notch_cutoff);
|
||||||
|
@ -131,7 +123,7 @@ pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
const dtermSetpointTransitionNumberElement = $('input[name="dtermSetpointTransition-number"]');
|
const dtermSetpointTransitionNumberElement = $('input[name="dtermSetpointTransition-number"]');
|
||||||
dtermSetpointTransitionNumberElement.attr('min', 0.00);
|
dtermSetpointTransitionNumberElement.attr('min', 0.00);
|
||||||
dtermSetpointTransitionNumberElement.val(FC.ADVANCED_TUNING.dtermSetpointTransition / 100);
|
dtermSetpointTransitionNumberElement.val(FC.ADVANCED_TUNING.dtermSetpointTransition / 100);
|
||||||
|
|
||||||
$('input[name="dtermSetpoint-number"]').val(FC.ADVANCED_TUNING.dtermSetpointWeight / 100);
|
$('input[name="dtermSetpoint-number"]').val(FC.ADVANCED_TUNING.dtermSetpointWeight / 100);
|
||||||
|
|
||||||
|
@ -1188,7 +1180,6 @@ pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
FC.ADVANCED_TUNING.useIntegratedYaw = $('input[id="useIntegratedYaw"]').is(':checked') ? 1 : 0;
|
FC.ADVANCED_TUNING.useIntegratedYaw = $('input[id="useIntegratedYaw"]').is(':checked') ? 1 : 0;
|
||||||
|
|
||||||
|
|
||||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) {
|
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_42)) {
|
||||||
FC.FILTER_CONFIG.dyn_notch_range = parseInt($('.pid_filter select[name="dynamicNotchRange"]').val());
|
FC.FILTER_CONFIG.dyn_notch_range = parseInt($('.pid_filter select[name="dynamicNotchRange"]').val());
|
||||||
FC.FILTER_CONFIG.dyn_notch_width_percent = parseInt($('.pid_filter input[name="dynamicNotchWidthPercent"]').val());
|
FC.FILTER_CONFIG.dyn_notch_width_percent = parseInt($('.pid_filter input[name="dynamicNotchWidthPercent"]').val());
|
||||||
|
@ -1324,7 +1315,7 @@ pid_tuning.initialize = function (callback) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useLegacyCurve = true;
|
const useLegacyCurve = false;
|
||||||
|
|
||||||
self.rateCurve = new RateCurve(useLegacyCurve);
|
self.rateCurve = new RateCurve(useLegacyCurve);
|
||||||
|
|
||||||
|
@ -1494,6 +1485,9 @@ pid_tuning.initialize = function (callback) {
|
||||||
checkUpdateDtermTransitionWarning($(this).val());
|
checkUpdateDtermTransitionWarning($(this).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#pid-tuning .delta').hide();
|
||||||
|
$('.tab-pid_tuning .note').hide();
|
||||||
|
|
||||||
// Add a name to each row of PIDs if empty
|
// Add a name to each row of PIDs if empty
|
||||||
$('.pid_tuning tr').each(function() {
|
$('.pid_tuning tr').each(function() {
|
||||||
for (const pidName of FC.PID_NAMES) {
|
for (const pidName of FC.PID_NAMES) {
|
||||||
|
|
|
@ -259,8 +259,6 @@ setup.initialize = function (callback) {
|
||||||
|
|
||||||
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false, function() {
|
MSP.send_message(MSPCodes.MSP_STATUS_EX, false, false, function() {
|
||||||
|
|
||||||
console.log(FC.CONFIG.armingDisableFlags);
|
|
||||||
|
|
||||||
$('#initialSetupArmingAllowed').toggle(FC.CONFIG.armingDisableFlags == 0);
|
$('#initialSetupArmingAllowed').toggle(FC.CONFIG.armingDisableFlags == 0);
|
||||||
|
|
||||||
for (let i = 0; i < FC.CONFIG.armingDisableCount; i++) {
|
for (let i = 0; i < FC.CONFIG.armingDisableCount; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue