1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 16:25:22 +03:00

bugfixes + removing obsolete code

This commit is contained in:
cTn 2013-11-09 06:18:45 +01:00
parent 0f23b5f5d9
commit 74323d894f
2 changed files with 18 additions and 41 deletions

View file

@ -141,34 +141,14 @@ $(document).ready(function() {
if (clicks) { // odd number of clicks
// Disable any active "data pulling" timer
disable_timers();
// Disable CLI (there is no "nicer way of doing so right now)
if (CLI_active == true) {
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);
clearTimeout(connection_delay);
clearInterval(serial_poll);
clearInterval(port_usage_poll);
}
GUI.tab_switch_cleanup();
chrome.serial.close(connectionId, onClosed);
clearTimeout(connection_delay);
clearInterval(serial_poll);
clearInterval(port_usage_poll);
// Change port utilization to 0
$('span.port-usage').html('0%');