1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-19 14:25:14 +03:00

Merge pull request #1896 from Asizon/hideEscSensor

Hide Esc Sensor for non digital protocols
This commit is contained in:
Michael Keller 2020-02-28 09:10:29 +13:00 committed by GitHub
commit ecf1936bbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 4 deletions

View file

@ -58,6 +58,13 @@
font-weight: bold;
}
.tab-configuration .featuresMultiple {
border-collapse: collapse;
margin-bottom: 5px;
margin-top: -5px;
padding: 0px;
}
.tab-configuration dl.features dt {
float: left;
width: 10px;

View file

@ -78,7 +78,7 @@ var Features = function (config) {
if (semver.gte(CONFIG.apiVersion, "1.31.0")) {
features.push(
{bit: 25, group: 'rxMode', mode: 'select', name: 'RX_SPI'},
{bit: 27, group: 'esc', name: 'ESC_SENSOR'}
{bit: 27, group: 'escSensor', name: 'ESC_SENSOR'}
);
}

View file

@ -544,6 +544,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('div.unsyncedpwmfreq').toggle(!digitalProtocol);
$('div.digitalIdlePercent').toggle(digitalProtocol);
$('.escSensor').toggle(digitalProtocol);
$('div.checkboxDshotBidir').toggle(semver.gte(CONFIG.apiVersion, "1.42.0") && digitalProtocol);
$('div.motorPoles').toggle(semver.gte(CONFIG.apiVersion, "1.42.0"));

View file

@ -173,11 +173,16 @@
</label>
</div>
</div>
<table cellpadding="0" cellspacing="0" style="margin-bottom: 5px;">
<table class="featuresMultiple">
<tbody class="features esc">
<!-- table generated here -->
</tbody>
</table>
<table class="featuresMultiple">
<tbody class="features escSensor">
<!-- table generated here -->
</tbody>
</table>
<!-- -->
<div class="number checkboxDshotBidir">
<div style="float: left; height: 20px; margin-right: 14px; margin-left: 3px;">
@ -451,7 +456,7 @@
<div class="note">
<p i18n="configurationOtherFeaturesHelp"></p>
</div>
<table cellpadding="0" cellspacing="0">
<table class="featuresMultiple">
<thead>
<tr>
<th i18n="configurationFeatureEnabled"></th>
@ -518,7 +523,7 @@
<div class="spacer_box_title" i18n="configurationGPS"></div>
</div>
<div class="spacer_box">
<table cellpadding="0" cellspacing="0">
<table class="featuresMultiple">
<thead>
<tr>
<th i18n="configurationFeatureEnabled"></th>