1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 06:15:11 +03:00

utilizing tab_switch_cleanup functionality

This commit is contained in:
cTn 2013-11-09 06:14:21 +01:00
parent 36604ca724
commit 0f23b5f5d9
4 changed files with 65 additions and 54 deletions

View file

@ -144,13 +144,24 @@ $(document).ready(function() {
// Disable CLI (there is no "nicer way of doing so right now)
if (CLI_active == true) {
leave_CLI(function() {
var bufferOut = new ArrayBuffer(5);
var bufView = new Uint8Array(bufferOut);
bufView[0] = 0x65; // e
bufView[1] = 0x78; // x
bufView[2] = 0x69; // i
bufView[3] = 0x74; // t
bufView[4] = 0x0D; // enter
chrome.serial.write(connectionId, bufferOut, function(writeInfo) {
chrome.serial.close(connectionId, onClosed);
clearTimeout(connection_delay);
clearInterval(serial_poll);
clearInterval(port_usage_poll);
});
});
CLI_active = false;
} else {
chrome.serial.close(connectionId, onClosed);