mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Merge pull request #1132 from McGiverGim/simplify_acro_trainer_slider
Simplify Acro Trainer Slider
This commit is contained in:
commit
ea53b766ad
3 changed files with 5 additions and 14 deletions
|
@ -2840,7 +2840,7 @@
|
|||
"message": "Acro Trainer Angle Limit"
|
||||
},
|
||||
"pidTuningAcroTrainerAngleLimitHelp": {
|
||||
"message": "Adds a new angle limiting mode for pilots who are learning to fly in acro mode. The range valid is 10-80 (a value of 0 deactivates it)"
|
||||
"message": "Adds a new angle limiting mode for pilots who are learning to fly in acro mode. The range valid is 10-80 and must be activated with a switch in the $t(tabAuxiliary.message) tab."
|
||||
},
|
||||
|
||||
"configHelp2": {
|
||||
|
|
|
@ -234,20 +234,11 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
var acroTrainerAngleLimitNumberElement = $('input[name="acroTrainerAngleLimit-number"]');
|
||||
var acroTrainerAngleLimitRangeElement = $('input[name="acroTrainerAngleLimit-range"]');
|
||||
|
||||
var validateAcroTrainerAngle = function(value) {
|
||||
// The minimum acro trainer angle is 10, but we must let zero too to deactivate it
|
||||
if (value > 0 && value < 10) {
|
||||
value = 10;
|
||||
}
|
||||
acroTrainerAngleLimitRangeElement.val(value);
|
||||
acroTrainerAngleLimitNumberElement.val(value);
|
||||
}
|
||||
|
||||
acroTrainerAngleLimitNumberElement.change(function () {
|
||||
validateAcroTrainerAngle($(this).val());
|
||||
acroTrainerAngleLimitRangeElement.val($(this).val());
|
||||
});
|
||||
acroTrainerAngleLimitRangeElement.change(function () {
|
||||
validateAcroTrainerAngle($(this).val());
|
||||
acroTrainerAngleLimitNumberElement.val($(this).val());
|
||||
});
|
||||
acroTrainerAngleLimitNumberElement.val(ADVANCED_TUNING.acroTrainerAngleLimit).change();
|
||||
|
||||
|
|
|
@ -340,8 +340,8 @@
|
|||
</tr>
|
||||
|
||||
<tr class="acroTrainerAngleLimit">
|
||||
<td><input type="number" name="acroTrainerAngleLimit-number" step="1" min="0" max="80"/></td>
|
||||
<td class="slider"><input type="range" name="acroTrainerAngleLimit-range" step="1" min="0" max="80"/></td>
|
||||
<td><input type="number" name="acroTrainerAngleLimit-number" step="1" min="10" max="80"/></td>
|
||||
<td class="slider"><input type="range" name="acroTrainerAngleLimit-range" step="1" min="10" max="80"/></td>
|
||||
<td colspan="2">
|
||||
<div>
|
||||
<label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue