1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 14:25:13 +03:00

moving request for MSP_BOXNAMES & MSP_BOX

to aux tab, as the content can dynamically change (while changing
configuration via CLI)
#12
This commit is contained in:
cTn 2013-12-05 09:54:49 +01:00
parent 71677c2b68
commit 607abbd046
2 changed files with 72 additions and 71 deletions

View file

@ -203,9 +203,6 @@ function onOpen(openInfo) {
send_message(MSP_codes.MSP_STATUS, MSP_codes.MSP_STATUS); send_message(MSP_codes.MSP_STATUS, MSP_codes.MSP_STATUS);
send_message(MSP_codes.MSP_PID, MSP_codes.MSP_PID); send_message(MSP_codes.MSP_PID, MSP_codes.MSP_PID);
send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING); send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING);
send_message(MSP_codes.MSP_BOXNAMES, MSP_codes.MSP_BOXNAMES);
send_message(MSP_codes.MSP_BOX, MSP_codes.MSP_BOX);
}, connection_delay * 1000); }, connection_delay * 1000);
} else { } else {
console.log('Failed to open serial port'); console.log('Failed to open serial port');

View file

@ -2,6 +2,8 @@ function tab_initialize_auxiliary_configuration() {
ga_tracker.sendAppView('Auxiliary Configuration'); ga_tracker.sendAppView('Auxiliary Configuration');
GUI.active_tab = 'auxiliary_configuration'; GUI.active_tab = 'auxiliary_configuration';
send_message(MSP_codes.MSP_BOXNAMES, MSP_codes.MSP_BOXNAMES, false, function() {
send_message(MSP_codes.MSP_BOX, MSP_codes.MSP_BOX, false, function() {
// generate table from the supplied AUX names and AUX data // generate table from the supplied AUX names and AUX data
for (var i = 0; i < AUX_CONFIG.length; i++) { for (var i = 0; i < AUX_CONFIG.length; i++) {
$('.tab-auxiliary_configuration .boxes > tbody:last').append( $('.tab-auxiliary_configuration .boxes > tbody:last').append(
@ -73,7 +75,9 @@ function tab_initialize_auxiliary_configuration() {
}); });
// enable data pulling // enable data pulling
timers.push(setInterval(aux_data_poll, 50)); GUI.interval_add('aux_data_poll', aux_data_poll, 50, true);
});
});
} }
function aux_data_poll() { function aux_data_poll() {