mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Merge pull request #387 from mikeller/added_level_angle_limit_sensitivity
Added level angle limit and level sensitivity.
This commit is contained in:
commit
bc4dbdbd3e
3 changed files with 41 additions and 7 deletions
|
@ -1686,6 +1686,12 @@
|
||||||
"pidTuningAngle": {
|
"pidTuningAngle": {
|
||||||
"message": "Angle"
|
"message": "Angle"
|
||||||
},
|
},
|
||||||
|
"pidTuningLevelAngleLimit": {
|
||||||
|
"message": "Angle Limit"
|
||||||
|
},
|
||||||
|
"pidTuningLevelSensitivity": {
|
||||||
|
"message": "Sensitivity"
|
||||||
|
},
|
||||||
"pidTuningLevelHelp": {
|
"pidTuningLevelHelp": {
|
||||||
"message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation."
|
"message": "The values below change the behaviour of the ANGLE and HORIZON flight modes. Different PID controllers handle the values differently. Please check the documentation."
|
||||||
},
|
},
|
||||||
|
|
|
@ -210,13 +210,6 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="pid_accel" class="gui_box grey topspacer pid_tuning">
|
<div id="pid_accel" class="gui_box grey topspacer pid_tuning">
|
||||||
<table class="pid_titlebar">
|
|
||||||
<tr>
|
|
||||||
<th class="third" i18n="pidTuningName"></th>
|
|
||||||
<th class="third" i18n="pidTuningStrength" style="width: 33%;"></th>
|
|
||||||
<th class="third" i18n="pidTuningTransition" style="width: 33%;"></th>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table id="pid_level" class="pid_tuning">
|
<table id="pid_level" class="pid_tuning">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3">
|
<th colspan="3">
|
||||||
|
@ -226,6 +219,15 @@
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table class="pid_titlebar">
|
||||||
|
<tr>
|
||||||
|
<th class="third" i18n="pidTuningName"></th>
|
||||||
|
<th class="third" i18n="pidTuningStrength" style="width: 33%;"></th>
|
||||||
|
<th class="third" i18n="pidTuningTransition" style="width: 33%;"></th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
<tr class="ANGLE">
|
<tr class="ANGLE">
|
||||||
<!-- 7 -->
|
<!-- 7 -->
|
||||||
<td class="third" i18n="pidTuningAngle"></td>
|
<td class="third" i18n="pidTuningAngle"></td>
|
||||||
|
@ -239,6 +241,20 @@
|
||||||
<td class="third"><input type="number" name="d" step="1" min="0" max="255" /></td>
|
<td class="third"><input type="number" name="d" step="1" min="0" max="255" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<table class="pid_titlebar pid_sensitivity">
|
||||||
|
<tr>
|
||||||
|
<th class="third"></th>
|
||||||
|
<th class="third" i18n="pidTuningLevelAngleLimit" style="width: 33%;"></th>
|
||||||
|
<th class="third" i18n="pidTuningLevelSensitivity" style="width: 33%;"></th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table id="pid_sensitivity" class="pid_tuning pid_sensitivity">
|
||||||
|
<tr>
|
||||||
|
<td class="third"></td>
|
||||||
|
<td class="third"><input type="number" name="angleLimit" step="1" min="10" max="200" /></td>
|
||||||
|
<td class="third"><input type="number" name="sensitivity" step="1" min="10" max="120" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="gui_box grey topspacer pidTuningFeatures">
|
<div class="gui_box grey topspacer pidTuningFeatures">
|
||||||
<table class="pid_titlebar new_rates">
|
<table class="pid_titlebar new_rates">
|
||||||
|
|
|
@ -263,6 +263,13 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
} else {
|
} else {
|
||||||
$('.pid_filter .gyroNotch2').hide();
|
$('.pid_filter .gyroNotch2').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.24.0")) {
|
||||||
|
$('.pid_tuning input[name="angleLimit"]').val(ADVANCED_TUNING.levelAngleLimit);
|
||||||
|
$('.pid_tuning input[name="sensitivity"]').val(ADVANCED_TUNING.levelSensitivity);
|
||||||
|
} else {
|
||||||
|
$('.pid_sensitivity').hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function form_to_pid_and_rc() {
|
function form_to_pid_and_rc() {
|
||||||
|
@ -369,6 +376,10 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (semver.gte(CONFIG.apiVersion, "1.24.0")) {
|
||||||
|
ADVANCED_TUNING.levelAngleLimit = parseInt($('.pid_tuning input[name="angleLimit"]').val());
|
||||||
|
ADVANCED_TUNING.levelSensitivity = parseInt($('.pid_tuning input[name="sensitivity"]').val());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAllPids() {
|
function showAllPids() {
|
||||||
|
@ -383,6 +394,7 @@ TABS.pid_tuning.initialize = function (callback) {
|
||||||
if (have_sensor(CONFIG.activeSensors, 'acc')) {
|
if (have_sensor(CONFIG.activeSensors, 'acc')) {
|
||||||
$('#pid_accel').show();
|
$('#pid_accel').show();
|
||||||
$('#pid_level').show();
|
$('#pid_level').show();
|
||||||
|
$('#pid_sensitivity').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
var showTitle = false;
|
var showTitle = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue