mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 14:25:14 +03:00
Add iterm relax cutoff to UI
This commit is contained in:
parent
3eb39d716c
commit
1fb5c046f4
6 changed files with 32 additions and 2 deletions
|
@ -3207,6 +3207,9 @@
|
||||||
"pidTuningItermRelaxTypeOptionSetpoint": {
|
"pidTuningItermRelaxTypeOptionSetpoint": {
|
||||||
"message": "Setpoint"
|
"message": "Setpoint"
|
||||||
},
|
},
|
||||||
|
"pidTuningItermRelaxCutoff": {
|
||||||
|
"message": "Cutoff:"
|
||||||
|
},
|
||||||
"pidTuningAbsoluteControlGain": {
|
"pidTuningAbsoluteControlGain": {
|
||||||
"message": "Absolute Control"
|
"message": "Absolute Control"
|
||||||
},
|
},
|
||||||
|
|
|
@ -298,7 +298,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-pid_tuning table.compensation .suboption {
|
.tab-pid_tuning table.compensation .suboption {
|
||||||
margin-left: 40px;
|
margin-left: 4%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-pid_tuning table.compensation .suboption select{
|
.tab-pid_tuning table.compensation .suboption select{
|
||||||
|
@ -308,6 +308,12 @@
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-pid_tuning table.compensation .suboption input{
|
||||||
|
display: inline-block;
|
||||||
|
width: 45px;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-pid_tuning .pidTuningFeatures td {
|
.tab-pid_tuning .pidTuningFeatures td {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
@ -515,7 +521,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.tab-pid_tuing .pid_titlebar td:first-child {
|
.tab-pid_tuning .pid_titlebar td:first-child {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,6 +400,7 @@ var FC = {
|
||||||
smartFeedforward: 0,
|
smartFeedforward: 0,
|
||||||
itermRelax: 0,
|
itermRelax: 0,
|
||||||
itermRelaxType: 0,
|
itermRelaxType: 0,
|
||||||
|
itermRelaxCutoff: 0,
|
||||||
absoluteControlGain: 0,
|
absoluteControlGain: 0,
|
||||||
throttleBoost: 0,
|
throttleBoost: 0,
|
||||||
acroTrainerAngleLimit: 0,
|
acroTrainerAngleLimit: 0,
|
||||||
|
|
|
@ -1044,6 +1044,10 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
||||||
ADVANCED_TUNING.dMinAdvance = data.readU8();
|
ADVANCED_TUNING.dMinAdvance = data.readU8();
|
||||||
ADVANCED_TUNING.useIntegratedYaw = data.readU8();
|
ADVANCED_TUNING.useIntegratedYaw = data.readU8();
|
||||||
ADVANCED_TUNING.integratedYawRelax = data.readU8();
|
ADVANCED_TUNING.integratedYawRelax = data.readU8();
|
||||||
|
|
||||||
|
if(semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
||||||
|
ADVANCED_TUNING.itermRelaxCutoff = data.readU8();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1798,6 +1802,10 @@ MspHelper.prototype.crunch = function(code) {
|
||||||
.push8(ADVANCED_TUNING.dMinAdvance)
|
.push8(ADVANCED_TUNING.dMinAdvance)
|
||||||
.push8(ADVANCED_TUNING.useIntegratedYaw)
|
.push8(ADVANCED_TUNING.useIntegratedYaw)
|
||||||
.push8(ADVANCED_TUNING.integratedYawRelax);
|
.push8(ADVANCED_TUNING.integratedYawRelax);
|
||||||
|
|
||||||
|
if(semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
||||||
|
buffer.push8(ADVANCED_TUNING.itermRelaxCutoff);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
itermRelaxCheck.prop('checked', ADVANCED_TUNING.itermRelax !== 0);
|
itermRelaxCheck.prop('checked', ADVANCED_TUNING.itermRelax !== 0);
|
||||||
$('select[id="itermrelaxAxes"]').val(ADVANCED_TUNING.itermRelax > 0 ? ADVANCED_TUNING.itermRelax : 1);
|
$('select[id="itermrelaxAxes"]').val(ADVANCED_TUNING.itermRelax > 0 ? ADVANCED_TUNING.itermRelax : 1);
|
||||||
$('select[id="itermrelaxType"]').val(ADVANCED_TUNING.itermRelaxType);
|
$('select[id="itermrelaxType"]').val(ADVANCED_TUNING.itermRelaxType);
|
||||||
|
$('input[name="itermRelaxCutoff"]').val(ADVANCED_TUNING.itermRelaxCutoff);
|
||||||
|
|
||||||
itermRelaxCheck.change(function() {
|
itermRelaxCheck.change(function() {
|
||||||
var checked = $(this).is(':checked');
|
var checked = $(this).is(':checked');
|
||||||
|
@ -350,6 +351,9 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
||||||
$('.smartfeedforward').hide();
|
$('.smartfeedforward').hide();
|
||||||
|
$('.itermRelaxCutoff').show();
|
||||||
|
} else {
|
||||||
|
$('.itermRelaxCutoff').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('input[id="useIntegratedYaw"]').change(function() {
|
$('input[id="useIntegratedYaw"]').change(function() {
|
||||||
|
@ -638,6 +642,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
|
|
||||||
ADVANCED_TUNING.itermRelax = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxAxes"]').val() : 0;
|
ADVANCED_TUNING.itermRelax = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxAxes"]').val() : 0;
|
||||||
ADVANCED_TUNING.itermRelaxType = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxType"]').val() : 0;
|
ADVANCED_TUNING.itermRelaxType = $('input[id="itermrelax"]').is(':checked') ? $('select[id="itermrelaxType"]').val() : 0;
|
||||||
|
ADVANCED_TUNING.itermRelaxCutoff = parseInt($('input[name="itermRelaxCutoff"]').val());
|
||||||
|
|
||||||
ADVANCED_TUNING.absoluteControlGain = $('input[name="absoluteControlGain-number"]').val();
|
ADVANCED_TUNING.absoluteControlGain = $('input[name="absoluteControlGain-number"]').val();
|
||||||
|
|
||||||
|
|
|
@ -488,6 +488,13 @@
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<span class="itermRelaxCutoff suboption">
|
||||||
|
<label for="itermRelaxCutoff">
|
||||||
|
<span i18n="pidTuningItermRelaxCutoff" />
|
||||||
|
</label>
|
||||||
|
<input type="number" name="itermRelaxCutoff" step="1" min="1" max="100" />
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="helpicon cf_tip" i18n_title="pidTuningItermRelaxHelp"></div>
|
<div class="helpicon cf_tip" i18n_title="pidTuningItermRelaxHelp"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue