function tab_initialize_auxiliary_configuration() {
ga_tracker.sendAppView('Auxiliary Configuration');
GUI.active_tab = 'auxiliary_configuration';
send_message(MSP_codes.MSP_BOXNAMES, false, false, get_box_data);
function get_box_data() {
send_message(MSP_codes.MSP_BOX, false, false, load_html);
}
function load_html() {
$('#content').load("./tabs/auxiliary_configuration.html", process_html);
}
function process_html() {
function box_check(num, pos) {
if (bit_check(num, pos)) { // 1
return '
';
} else { // 0
return '
';
}
}
// val = channel value
// aux_num = position of corresponding aux channel in the html table
function box_highlight(val, aux_num) {
var tr = $('table.boxes tr');
var pos = 0; // < 1300
if (val > 1300 && val < 1700) {
pos = 1;
} else if (val > 1700) {
pos = 2;
}
$(':nth-child(' + aux_num + '), :nth-child(' + (aux_num + 1) + '), :nth-child(' + (aux_num + 2) + ')', tr).css('background-color', 'transparent');
$('td:nth-child(' + (aux_num + pos) + ')', tr).css('background-color', 'orange');
}
// generate table from the supplied AUX names and AUX data
for (var i = 0; i < AUX_CONFIG.length; i++) {
$('.boxes > tbody:last').append(
'