request and store MSP_BOXIDS (for reasons unknown at the moment)
parent
930a7f482f
commit
8a52551671
|
@ -40,6 +40,7 @@ var RC_tuning = {
|
|||
|
||||
var AUX_CONFIG = [];
|
||||
var AUX_CONFIG_values = [];
|
||||
var AUX_CONFIG_IDS = [];
|
||||
|
||||
var SERVO_CONFIG = [];
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue