use FC version as condition to detect which is support rcsplit or not.

pull/221/head
azolyoung 7 years ago
parent 73f324e4c1
commit 02d4a8ae47

@ -20735,7 +20735,7 @@ TABS.ports = {};
TABS.ports.initialize = function (callback, scrollPosition) { TABS.ports.initialize = function (callback, scrollPosition) {
var board_definition = {}; var board_definition = {};
var isSupportPeripherals = semver.gte(CONFIG.apiVersion, "1.27.0"); var isSupportPeripherals = semver.gte(CONFIG.flightControllerVersion, "1.7.3");
var functionRules = [ var functionRules = [
{name: 'MSP', groups: ['data', 'msp'], maxPorts: 2}, {name: 'MSP', groups: ['data', 'msp'], maxPorts: 2},
@ -20859,7 +20859,6 @@ TABS.ports.initialize = function (callback, scrollPosition) {
31: 'SOFTSERIAL2' 31: 'SOFTSERIAL2'
}; };
// if apiVersion < 1.27.0, than remove the peripherals column
if (!isSupportPeripherals) { if (!isSupportPeripherals) {
$('.peripherls-column').remove(); $('.peripherls-column').remove();
$('.functionsCell-peripherals').remove(); $('.functionsCell-peripherals').remove();

@ -4,7 +4,7 @@ TABS.ports = {};
TABS.ports.initialize = function (callback, scrollPosition) { TABS.ports.initialize = function (callback, scrollPosition) {
var board_definition = {}; var board_definition = {};
var isSupportPeripherals = semver.gte(CONFIG.apiVersion, "1.27.0"); var isSupportPeripherals = semver.gte(CONFIG.flightControllerVersion, "1.7.3");
var functionRules = [ var functionRules = [
{name: 'MSP', groups: ['data', 'msp'], maxPorts: 2}, {name: 'MSP', groups: ['data', 'msp'], maxPorts: 2},
@ -128,7 +128,6 @@ TABS.ports.initialize = function (callback, scrollPosition) {
31: 'SOFTSERIAL2' 31: 'SOFTSERIAL2'
}; };
// if apiVersion < 1.27.0, than remove the peripherals column
if (!isSupportPeripherals) { if (!isSupportPeripherals) {
$('.peripherls-column').remove(); $('.peripherls-column').remove();
$('.functionsCell-peripherals').remove(); $('.functionsCell-peripherals').remove();

Loading…
Cancel
Save