|
|
@ -239,12 +239,9 @@ TABS.ports.initialize = function (callback, scrollPosition) {
|
|
|
|
blackbox_baudrate: $(portConfiguration_e).find('.blackbox_baudrate').val(),
|
|
|
|
blackbox_baudrate: $(portConfiguration_e).find('.blackbox_baudrate').val(),
|
|
|
|
identifier: oldSerialPort.identifier
|
|
|
|
identifier: oldSerialPort.identifier
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
console.log(serialPort);
|
|
|
|
|
|
|
|
SERIAL_CONFIG.ports.push(serialPort);
|
|
|
|
SERIAL_CONFIG.ports.push(serialPort);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MSP.send_message(MSP_codes.MSP_SET_CF_SERIAL_CONFIG, MSP.crunch(MSP_codes.MSP_SET_CF_SERIAL_CONFIG), false, save_to_eeprom);
|
|
|
|
MSP.send_message(MSP_codes.MSP_SET_CF_SERIAL_CONFIG, MSP.crunch(MSP_codes.MSP_SET_CF_SERIAL_CONFIG), false, save_to_eeprom);
|
|
|
|
|
|
|
|
|
|
|
|
function save_to_eeprom() {
|
|
|
|
function save_to_eeprom() {
|
|
|
@ -262,14 +259,22 @@ TABS.ports.initialize = function (callback, scrollPosition) {
|
|
|
|
function on_reboot_success_handler() {
|
|
|
|
function on_reboot_success_handler() {
|
|
|
|
GUI.log(chrome.i18n.getMessage('deviceRebooting'));
|
|
|
|
GUI.log(chrome.i18n.getMessage('deviceRebooting'));
|
|
|
|
|
|
|
|
|
|
|
|
var rebootTimeoutDelay = 1500; // seems to be just the right amount of delay to prevent data request timeouts
|
|
|
|
if (BOARD.find_board_definition(CONFIG.boardIdentifier).vcp) { // VCP-based flight controls may crash old drivers, we catch and reconnect
|
|
|
|
|
|
|
|
$('a.connect').click();
|
|
|
|
|
|
|
|
GUI.timeout_add('start_connection',function start_connection() {
|
|
|
|
|
|
|
|
$('a.connect').click();
|
|
|
|
|
|
|
|
},2000);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
GUI.timeout_add('waiting_for_bootup', function waiting_for_bootup() {
|
|
|
|
GUI.timeout_add('waiting_for_bootup', function waiting_for_bootup() {
|
|
|
|
MSP.send_message(MSP_codes.MSP_IDENT, false, false, function () {
|
|
|
|
MSP.send_message(MSP_codes.MSP_IDENT, false, false, function () {
|
|
|
|
GUI.log(chrome.i18n.getMessage('deviceReady'));
|
|
|
|
GUI.log(chrome.i18n.getMessage('deviceReady'));
|
|
|
|
TABS.ports.initialize(false, $('#content').scrollTop());
|
|
|
|
TABS.ports.initialize(false, $('#content').scrollTop());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, rebootTimeoutDelay);
|
|
|
|
}, 1500); // seems to be just the right amount of delay to prevent data request timeouts
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|