mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 20:35:19 +03:00
display mode values in aux tab (realtime)
This commit is contained in:
parent
bced4d0cb5
commit
30c2faa2d5
3 changed files with 18 additions and 8 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 '<td class="on"><input type="checkbox" checked="checked" /></td>';
|
||||
return '<td><input type="checkbox" checked="checked" /></td>';
|
||||
} else { // 0
|
||||
return '<td><input type="checkbox" /></td>';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue