diff --git a/main.js b/main.js index 2ecb1d51..d10ca105 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 082f15e4..0c4b428f 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(); +};