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

updating background script

This commit is contained in:
cTn 2014-01-18 12:01:20 +01:00
parent c3d95d67bd
commit 32c1a94462

View file

@ -6,8 +6,8 @@ function start_app() {
window_child.onClosed.addListener(function() {
// connectionId is passed from the script side through the chrome.runtime.getBackgroundPage refference
// allowing us to automatically close the port when application shut down
if (app_window.connectionId > 0) {
chrome.serial.close(app_window.connectionId, function(result) {
if (app_window.serial.connectionId > 0) {
chrome.serial.disconnect(app_window.serial.connectionId, function(result) {
console.log('SERIAL: Connection closed - ' + result);
});
}