From 13f49c0f64f03016435dbd983d9645cdb06e5687 Mon Sep 17 00:00:00 2001 From: cTn Date: Thu, 10 Jul 2014 18:20:09 +0200 Subject: [PATCH] receiver in tabs --- main.js | 2 +- tabs/receiver.js | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 2ecb1d51b5..d10ca1050a 100644 --- a/main.js +++ b/main.js @@ -80,7 +80,7 @@ $(document).ready(function() { tabs.pid_tuning.initialize(); break; case 'tab_receiver': - tab_initialize_receiver(); + tabs.receiver.initialize(); break; case 'tab_auxiliary_configuration': tab_initialize_auxiliary_configuration(); diff --git a/tabs/receiver.js b/tabs/receiver.js index 082f15e46f..0c4b428f14 100644 --- a/tabs/receiver.js +++ b/tabs/receiver.js @@ -1,4 +1,7 @@ -function tab_initialize_receiver(callback) { +tabs.receiver = function() { +}; + +tabs.receiver.initialize = function(callback) { ga_tracker.sendAppView('Receiver Page'); GUI.active_tab = 'receiver'; @@ -266,5 +269,11 @@ function tab_initialize_receiver(callback) { GUI.interval_add('status_pull', function() { MSP.send_message(MSP_codes.MSP_STATUS); }, 250, true); + + if (callback) callback(); } -} +}; + +tabs.receiver.cleanup = function(callback) { + if (callback) callback(); +};