diff --git a/css/style.css b/css/style.css index 294a956af3..b84a7077cb 100644 --- a/css/style.css +++ b/css/style.css @@ -700,8 +700,13 @@ a:hover { text-align: center; } .tab-auxiliary_configuration .boxes .on { + color: white; background-color: #0d8b13; } + .tab-auxiliary_configuration .boxes .off { + color: white; + background-color: #be2222; + } .tab-auxiliary_configuration .boxes td input { position: absolute; diff --git a/js/serial_backend.js b/js/serial_backend.js index 10fc7f56a5..8229e0fe37 100644 --- a/js/serial_backend.js +++ b/js/serial_backend.js @@ -485,7 +485,6 @@ function process_message(code, data) { CONFIG.profile = view.getUint8(10); $('span.cycle-time').html(CONFIG.cycleTime); - sensor_status(CONFIG.activeSensors); break; case MSP_codes.MSP_RAW_IMU: diff --git a/tabs/auxiliary_configuration.js b/tabs/auxiliary_configuration.js index 94b3901364..1d9f15737e 100644 --- a/tabs/auxiliary_configuration.js +++ b/tabs/auxiliary_configuration.js @@ -27,12 +27,6 @@ function tab_initialize_auxiliary_configuration() { // UI Hooks $('.tab-auxiliary_configuration .boxes input').change(function() { - if($(this).is(':checked')) { - $(this).parent().addClass('on'); - } else { - $(this).parent().removeClass('on'); - } - // if any of the fields changed, unlock update button $('a.update').addClass('active'); }); @@ -83,11 +77,23 @@ function tab_initialize_auxiliary_configuration() { function aux_data_poll() { send_message(MSP_codes.MSP_STATUS, MSP_codes.MSP_STATUS); + + for (var i = 0; i < AUX_CONFIG.length; i++) { + if (bit_check(CONFIG.mode, i)) { + $('td.name').eq(i).addClass('on').removeClass('off'); + } else { + $('td.name').eq(i).removeClass('on').removeClass('off'); + + if (AUX_CONFIG_values[i] > 0) { + $('td.name').eq(i).addClass('off'); + } + } + } } function box_check(num, pos) { if (bit_check(num, pos)) { // 1 - return ''; + return ''; } else { // 0 return ''; }