request and store MSP_BOXIDS (for reasons unknown at the moment)

10.3.x-maintenance
cTn 2014-07-11 17:52:56 +02:00
parent 930a7f482f
commit 8a52551671
3 changed files with 11 additions and 2 deletions

View File

@ -40,6 +40,7 @@ var RC_tuning = {
var AUX_CONFIG = [];
var AUX_CONFIG_values = [];
var AUX_CONFIG_IDS = [];
var SERVO_CONFIG = [];

View File

@ -342,7 +342,11 @@ MSP.process_data = function(code, message_buffer, message_length) {
console.log(data);
break;
case MSP_codes.MSP_BOXIDS:
console.log(data);
AUX_CONFIG_IDS = []; // empty the array as new data is coming in
for (var i = 0; i < data.byteLength; i++) {
AUX_CONFIG_IDS.push(data.getUint8(i));
}
break;
case MSP_codes.MSP_SERVO_CONF:
SERVO_CONFIG = []; // empty the array as new data is coming in

View File

@ -8,7 +8,11 @@ tabs.auxiliary_configuration.initialize = function(callback) {
MSP.send_message(MSP_codes.MSP_BOXNAMES, false, false, get_box_data);
function get_box_data() {
MSP.send_message(MSP_codes.MSP_BOX, false, false, get_rc_data);
MSP.send_message(MSP_codes.MSP_BOX, false, false, get_box_ids);
}
function get_box_ids() {
MSP.send_message(MSP_codes.MSP_BOXIDS, false, false, get_rc_data);
}
function get_rc_data() {