mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 14:25:14 +03:00
Add FF Interpolation Options
Sonar issues Move to Msp 1.44 and some fixes sonar sonar2 new sonar issues Suggested changes Default to AVG_2 Fix Indexation remove HEAD word fix API const and sonnar
This commit is contained in:
parent
27848ca94a
commit
f5410499dd
5 changed files with 99 additions and 2 deletions
|
@ -1761,6 +1761,33 @@
|
||||||
"pidTuningDtermSetpointTransitionWarning": {
|
"pidTuningDtermSetpointTransitionWarning": {
|
||||||
"message": "<span class=\"message-negative\"><strong>$t(warningTitle.message):<\/strong> The use of a D Setpoint transition greater than 0 and less than 0.1 is highly discouraged. Doing so may lead instability and reduced stick responsiveness as the sticks cross the centre point.<\/span>"
|
"message": "<span class=\"message-negative\"><strong>$t(warningTitle.message):<\/strong> The use of a D Setpoint transition greater than 0 and less than 0.1 is highly discouraged. Doing so may lead instability and reduced stick responsiveness as the sticks cross the centre point.<\/span>"
|
||||||
},
|
},
|
||||||
|
"pidTuningFfInterpolateSp": {
|
||||||
|
"message": "FF Interpolate"
|
||||||
|
},
|
||||||
|
"pidTuningFfInterpolateSpHelp": {
|
||||||
|
"message": "The following options fine-tune feed forward from race/aggressive to smooth/HD.<br><br> Mode: set to NO_AVG for race, AVG_2 for race/fast freestyle, AVG_3 for HD recording, AVG_4 for HD cinematic smoothness.<br><br> Smoothness: limits the amount of change that any one incoming radio step can make, increase for smoother FF signal, decrease for more aggressive FF responses.<br><br> Boost: helps overcome motor lag with quick stick inputs, can increase jitter. Try 10 for HD, 20 for racers. Up to 30 may be useful for low authority quads but can cause micro overshoot or jitter."
|
||||||
|
},
|
||||||
|
"pidTuningFfInterpolate": {
|
||||||
|
"message": "Mode"
|
||||||
|
},
|
||||||
|
"pidTuningFfInterpolateSpOptionNoAverage": {
|
||||||
|
"message": "No AVG"
|
||||||
|
},
|
||||||
|
"pidTuningFfInterpolateSpOptionAverage2": {
|
||||||
|
"message": "AVG 2"
|
||||||
|
},
|
||||||
|
"pidTuningFfInterpolateSpOptionAverage3": {
|
||||||
|
"message": "AVG 3"
|
||||||
|
},
|
||||||
|
"pidTuningFfInterpolateSpOptionAverage4": {
|
||||||
|
"message": "AVG 4"
|
||||||
|
},
|
||||||
|
"pidTuningFfSmoothFactor": {
|
||||||
|
"message": "Smoothness"
|
||||||
|
},
|
||||||
|
"pidTuningFfBoost": {
|
||||||
|
"message": "Boost"
|
||||||
|
},
|
||||||
"pidTuningProportional": {
|
"pidTuningProportional": {
|
||||||
"message": "Proportional"
|
"message": "Proportional"
|
||||||
},
|
},
|
||||||
|
|
|
@ -458,6 +458,9 @@ var FC = {
|
||||||
motorOutputLimit: 0,
|
motorOutputLimit: 0,
|
||||||
autoProfileCellCount: 0,
|
autoProfileCellCount: 0,
|
||||||
idleMinRpm: 0,
|
idleMinRpm: 0,
|
||||||
|
ff_interpolate_sp: 0,
|
||||||
|
ff_smooth_factor: 0,
|
||||||
|
ff_boost: 0,
|
||||||
};
|
};
|
||||||
ADVANCED_TUNING_ACTIVE = { ...ADVANCED_TUNING };
|
ADVANCED_TUNING_ACTIVE = { ...ADVANCED_TUNING };
|
||||||
|
|
||||||
|
|
|
@ -1152,6 +1152,12 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
||||||
ADVANCED_TUNING.motorOutputLimit = data.readU8();
|
ADVANCED_TUNING.motorOutputLimit = data.readU8();
|
||||||
ADVANCED_TUNING.autoProfileCellCount = data.read8();
|
ADVANCED_TUNING.autoProfileCellCount = data.read8();
|
||||||
ADVANCED_TUNING.idleMinRpm = data.readU8();
|
ADVANCED_TUNING.idleMinRpm = data.readU8();
|
||||||
|
|
||||||
|
if(semver.gte(CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
|
ADVANCED_TUNING.ff_interpolate_sp = data.readU8();
|
||||||
|
ADVANCED_TUNING.ff_smooth_factor = data.readU8();
|
||||||
|
ADVANCED_TUNING.ff_boost = data.readU8();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2086,6 +2092,12 @@ MspHelper.prototype.crunch = function(code) {
|
||||||
buffer.push8(ADVANCED_TUNING.motorOutputLimit)
|
buffer.push8(ADVANCED_TUNING.motorOutputLimit)
|
||||||
.push8(ADVANCED_TUNING.autoProfileCellCount)
|
.push8(ADVANCED_TUNING.autoProfileCellCount)
|
||||||
.push8(ADVANCED_TUNING.idleMinRpm);
|
.push8(ADVANCED_TUNING.idleMinRpm);
|
||||||
|
|
||||||
|
if(semver.gte(CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
|
buffer.push8(ADVANCED_TUNING.ff_interpolate_sp)
|
||||||
|
.push8(ADVANCED_TUNING.ff_smooth_factor)
|
||||||
|
.push8(ADVANCED_TUNING.ff_boost);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -395,8 +395,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
$('.pid_filter input[name="rpmFilterHarmonics"]').val(FILTER_DEFAULT.gyro_rpm_notch_harmonics);
|
$('.pid_filter input[name="rpmFilterHarmonics"]').val(FILTER_DEFAULT.gyro_rpm_notch_harmonics);
|
||||||
}
|
}
|
||||||
}).prop('checked', FILTER_CONFIG.gyro_rpm_notch_harmonics != 0).change();
|
}).prop('checked', FILTER_CONFIG.gyro_rpm_notch_harmonics != 0).change();
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.itermRelaxCutoff').hide();
|
$('.itermRelaxCutoff').hide();
|
||||||
$('.dynamicNotch').hide();
|
$('.dynamicNotch').hide();
|
||||||
|
@ -438,6 +436,25 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
$('.rates_type').hide();
|
$('.rates_type').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semver.gte(CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
|
// FF Interpolate
|
||||||
|
const ffInterpolateCheck = $('input[id="ffInterpolateSp"]');
|
||||||
|
|
||||||
|
ffInterpolateCheck.prop('checked', ADVANCED_TUNING.ff_interpolate_sp !== 0);
|
||||||
|
$('select[id="ffInterpolate"]').val(ADVANCED_TUNING.ff_interpolate_sp > 0 ? ADVANCED_TUNING.ff_interpolate_sp : 2);
|
||||||
|
$('input[name="ffSmoothFactor"]').val(ADVANCED_TUNING.ff_smooth_factor);
|
||||||
|
$('input[name="ffBoost"]').val(ADVANCED_TUNING.ff_boost);
|
||||||
|
|
||||||
|
ffInterpolateCheck.change(function() {
|
||||||
|
const checked = $(this).is(':checked');
|
||||||
|
$('.ffInterpolateSp .suboption').toggle(checked);
|
||||||
|
});
|
||||||
|
ffInterpolateCheck.change();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('.ffInterpolateSp').hide();
|
||||||
|
}
|
||||||
|
|
||||||
$('input[id="useIntegratedYaw"]').change(function() {
|
$('input[id="useIntegratedYaw"]').change(function() {
|
||||||
var checked = $(this).is(':checked');
|
var checked = $(this).is(':checked');
|
||||||
$('#pidTuningIntegratedYawCaution').toggle(checked);
|
$('#pidTuningIntegratedYawCaution').toggle(checked);
|
||||||
|
@ -898,7 +915,11 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
RC_tuning.rates_type = selectedRatesType;
|
RC_tuning.rates_type = selectedRatesType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (semver.gte(CONFIG.apiVersion, API_VERSION_1_44)) {
|
if (semver.gte(CONFIG.apiVersion, API_VERSION_1_44)) {
|
||||||
|
ADVANCED_TUNING.ff_interpolate_sp = $('input[id="ffInterpolateSp"]').is(':checked') ? $('select[id="ffInterpolate"]').val() : 0;
|
||||||
|
ADVANCED_TUNING.ff_smooth_factor = parseInt($('input[name="ffSmoothFactor"]').val());
|
||||||
|
ADVANCED_TUNING.ff_boost = parseInt($('input[name="ffBoost"]').val());
|
||||||
FILTER_CONFIG.dyn_lpf_curve_expo = parseInt($('.pid_filter input[name="dtermLowpassDynExpo"]').val());
|
FILTER_CONFIG.dyn_lpf_curve_expo = parseInt($('.pid_filter input[name="dtermLowpassDynExpo"]').val());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,6 +474,40 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr class="ffInterpolateSp">
|
||||||
|
<td><input type="checkbox" id="ffInterpolateSp" class="toggle" /></td>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="helpicon cf_tip" i18n_title="pidTuningFfInterpolateSpHelp"></div>
|
||||||
|
<span i18n="pidTuningFfInterpolateSp" />
|
||||||
|
|
||||||
|
<span class="ffInterpolate suboption">
|
||||||
|
<select id="ffInterpolate">
|
||||||
|
<option i18n="pidTuningFfInterpolateSpOptionNoAverage" value="1">
|
||||||
|
<option i18n="pidTuningFfInterpolateSpOptionAverage2" value="2"/>
|
||||||
|
<option i18n="pidTuningFfInterpolateSpOptionAverage3" value="3"/>
|
||||||
|
<option i18n="pidTuningFfInterpolateSpOptionAverage4" value="4"/>
|
||||||
|
</select>
|
||||||
|
<label for="ffInterpolate">
|
||||||
|
<span i18n="pidTuningFfInterpolate" />
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="ffSmoothFactor suboption">
|
||||||
|
<input type="number" name="ffSmoothFactor" step="1" min="0" max="75" />
|
||||||
|
<label for="ffSmoothFactor">
|
||||||
|
<span i18n="pidTuningFfSmoothFactor" />
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="ffBoost suboption">
|
||||||
|
<input type="number" name="ffBoost" step="1" min="0" max="50" />
|
||||||
|
<label for="ffBoost">
|
||||||
|
<span i18n="pidTuningFfBoost" />
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr class="acroTrainerAngleLimit">
|
<tr class="acroTrainerAngleLimit">
|
||||||
<td><input type="number" name="acroTrainerAngleLimit-number" step="1" min="10" max="80"/></td>
|
<td><input type="number" name="acroTrainerAngleLimit-number" step="1" min="10" max="80"/></td>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue