diff --git a/js/Features.js b/js/Features.js index 925f9142..6a52cb2b 100644 --- a/js/Features.js +++ b/js/Features.js @@ -21,8 +21,7 @@ var Features = function (config) { {bit: 15, group: 'rssi', name: 'RSSI_ADC'}, {bit: 16, group: 'other', name: 'LED_STRIP'}, {bit: 17, group: 'other', name: 'DISPLAY'}, - {bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true}, - {bit: 27, group: 'other', name: 'ESC_TELEMETRY'} + {bit: 19, group: 'other', name: 'BLACKBOX', haveTip: true} ]; if (semver.gte(config.apiVersion, "1.12.0")) { @@ -65,6 +64,12 @@ var Features = function (config) { {bit: 18, group: 'other', name: 'OSD'} ); } + + if (semver.gte(config.flightControllerVersion, "3.1.0")) { + features.push( + {bit: 27, group: 'other', name: 'ESC_TELEMETRY'} + ) + } } self._features = features; diff --git a/tabs/ports.js b/tabs/ports.js index 21189b62..b35a5c00 100644 --- a/tabs/ports.js +++ b/tabs/ports.js @@ -13,7 +13,6 @@ TABS.ports.initialize = function (callback, scrollPosition) { {name: 'TELEMETRY_FRSKY', groups: ['telemetry'], sharableWith: ['msp'], notSharableWith: ['blackbox'], maxPorts: 1}, {name: 'TELEMETRY_HOTT', groups: ['telemetry'], sharableWith: ['msp'], notSharableWith: ['blackbox'], maxPorts: 1}, {name: 'TELEMETRY_SMARTPORT', groups: ['telemetry'], maxPorts: 1}, - {name: 'TELEMETRY_ESC', groups: ['telemetry'], maxPorts: 1}, {name: 'RX_SERIAL', groups: ['rx'], maxPorts: 1}, {name: 'BLACKBOX', groups: ['logging', 'blackbox'], sharableWith: ['msp'], notSharableWith: ['telemetry'], maxPorts: 1}, ]; @@ -31,6 +30,11 @@ TABS.ports.initialize = function (callback, scrollPosition) { functionRules.push(mavlinkFunctionRule); } + if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) { + var escTlmFunctionRule = {name: 'TELEMETRY_ESC', groups: ['telemetry'], maxPorts: 1}; + functionRules.push(escTlmFunctionRule); + } + for (var i = 0; i < functionRules.length; i++) { functionRules[i].displayName = chrome.i18n.getMessage('portsFunction_' + functionRules[i].name); }