From d011599450ca8d6a2070cfdf91dc48d2281b0aa2 Mon Sep 17 00:00:00 2001 From: mikeller Date: Sun, 30 Apr 2017 21:56:03 +1200 Subject: [PATCH] Fixes to make cleanflight-configurator code work in betaflight-configurator. --- js/serial_backend.js | 4 ++-- tabs/power.js | 3 ++- tabs/setup_osd.js | 3 ++- tabs/transponder.js | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/js/serial_backend.js b/js/serial_backend.js index 378cf038..1a96816b 100755 --- a/js/serial_backend.js +++ b/js/serial_backend.js @@ -210,7 +210,7 @@ function onOpen(openInfo) { // continue as usually CONFIGURATOR.connectionValid = true; - GUI.allowedTabs = GUI.defaultAllowedTabsWhenConnected.slice(); + GUI.allowedTabs = GUI.defaultAllowedFCTabsWhenConnected.slice(); if (semver.lt(CONFIG.apiVersion, "1.4.0")) { GUI.allowedTabs.splice(GUI.allowedTabs.indexOf('led_strip'), 1); } @@ -220,7 +220,7 @@ function onOpen(openInfo) { $('#tabs ul.mode-connected .tab_setup a').click(); }); }); - } + }); }); } else { GUI.show_modal(chrome.i18n.getMessage('warningTitle'), diff --git a/tabs/power.js b/tabs/power.js index 711c1aa2..243ae3b5 100644 --- a/tabs/power.js +++ b/tabs/power.js @@ -9,7 +9,8 @@ TABS.power.initialize = function (callback) { if (GUI.active_tab != 'power') { GUI.active_tab = 'power'; - googleAnalytics.sendAppView('Power'); + // Disabled on merge into betaflight-configurator + //googleAnalytics.sendAppView('Power'); } function load_status() { diff --git a/tabs/setup_osd.js b/tabs/setup_osd.js index 9c7b7fde..cf7d5af7 100644 --- a/tabs/setup_osd.js +++ b/tabs/setup_osd.js @@ -8,7 +8,8 @@ TABS.setup_osd.initialize = function (callback) { if (GUI.active_tab != 'setup_osd') { GUI.active_tab = 'setup_osd'; - googleAnalytics.sendAppView('Setup OSD'); + // Disabled on merge into betaflight-configurator + //googleAnalytics.sendAppView('Setup OSD'); } function load_status() { diff --git a/tabs/transponder.js b/tabs/transponder.js index 64ca0d75..a34af3b4 100644 --- a/tabs/transponder.js +++ b/tabs/transponder.js @@ -42,7 +42,8 @@ TABS.transponder.initialize = function(callback, scrollPosition) { if ( GUI.active_tab != 'transponder' ) { GUI.active_tab = 'transponder'; - googleAnalytics.sendAppView('Transponder'); + // Disabled on merge into betaflight-configurator + //googleAnalytics.sendAppView('Transponder'); } // transponder supported added in MSP API Version 1.16.0 if ( CONFIG ) {