Skip to content

Commit 2fb9a87

Browse files
committed
Added version gating (check on BF 3.1.0)
1 parent 8aa40f1 commit 2fb9a87

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

js/Features.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ var Features = function (config) {
2121
{bit: 15, group: 'rssi', name: 'RSSI_ADC'},
2222
{bit: 16, group: 'other', name: 'LED_STRIP'},
2323
{bit: 17, group: 'other', name: 'DISPLAY'},
24-
{bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true},
25-
{bit: 27, group: 'other', name: 'ESC_TELEMETRY'}
24+
{bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true}
2625
];
2726

2827
if (semver.gte(config.apiVersion, "1.12.0")) {
@@ -65,6 +64,12 @@ var Features = function (config) {
6564
{bit: 18, group: 'other', name: 'OSD'}
6665
);
6766
}
67+
68+
if (semver.gte(config.flightControllerVersion, "3.1.0")) {
69+
features.push(
70+
{bit: 27, group: 'other', name: 'ESC_TELEMETRY'}
71+
)
72+
}
6873
}
6974

7075
self._features = features;

tabs/ports.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ TABS.ports.initialize = function (callback, scrollPosition) {
1313
{name: 'TELEMETRY_FRSKY', groups: ['telemetry'], sharableWith: ['msp'], notSharableWith: ['blackbox'], maxPorts: 1},
1414
{name: 'TELEMETRY_HOTT', groups: ['telemetry'], sharableWith: ['msp'], notSharableWith: ['blackbox'], maxPorts: 1},
1515
{name: 'TELEMETRY_SMARTPORT', groups: ['telemetry'], maxPorts: 1},
16-
{name: 'TELEMETRY_ESC', groups: ['telemetry'], maxPorts: 1},
1716
{name: 'RX_SERIAL', groups: ['rx'], maxPorts: 1},
1817
{name: 'BLACKBOX', groups: ['logging', 'blackbox'], sharableWith: ['msp'], notSharableWith: ['telemetry'], maxPorts: 1},
1918
];
@@ -31,6 +30,11 @@ TABS.ports.initialize = function (callback, scrollPosition) {
3130
functionRules.push(mavlinkFunctionRule);
3231
}
3332

33+
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
34+
var escTlmFunctionRule = {name: 'TELEMETRY_ESC', groups: ['telemetry'], maxPorts: 1};
35+
functionRules.push(escTlmFunctionRule);
36+
}
37+
3438
for (var i = 0; i < functionRules.length; i++) {
3539
functionRules[i].displayName = chrome.i18n.getMessage('portsFunction_' + functionRules[i].name);
3640
}

0 commit comments

Comments
 (0)