mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 04:15:28 +03:00
cleaning up
This commit is contained in:
parent
a42a464d1f
commit
d27660492e
2 changed files with 5 additions and 5 deletions
|
@ -11,7 +11,7 @@ chrome.app.runtime.onLaunched.addListener(function() {
|
||||||
// connectionId is passed from the script side through the chrome.runtime.getBackgroundPage refference
|
// connectionId is passed from the script side through the chrome.runtime.getBackgroundPage refference
|
||||||
// allowing us to automatically close the port when application shut down
|
// allowing us to automatically close the port when application shut down
|
||||||
if (connectionId != -1) {
|
if (connectionId != -1) {
|
||||||
chrome.serial.close(connectionId, function(){
|
chrome.serial.close(connectionId, function() {
|
||||||
console.log('CLEANUP: Connection to serial port was opened after application closed, closing the connection.');
|
console.log('CLEANUP: Connection to serial port was opened after application closed, closing the connection.');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,10 @@ chrome.runtime.getBackgroundPage(function(result) {
|
||||||
|
|
||||||
// OS detection
|
// OS detection
|
||||||
var OS = "Unknown";
|
var OS = "Unknown";
|
||||||
if (navigator.appVersion.indexOf("Win") != -1) OS = "Windows";
|
if (navigator.appVersion.indexOf("Win") != -1) OS = "Windows";
|
||||||
if (navigator.appVersion.indexOf("Mac") != -1) OS = "MacOS";
|
else if (navigator.appVersion.indexOf("Mac") != -1) OS = "MacOS";
|
||||||
if (navigator.appVersion.indexOf("X11") != -1) OS = "UNIX";
|
else if (navigator.appVersion.indexOf("X11") != -1) OS = "UNIX";
|
||||||
if (navigator.appVersion.indexOf("Linux") != -1) OS = "Linux";
|
else if (navigator.appVersion.indexOf("Linux") != -1) OS = "Linux";
|
||||||
|
|
||||||
var timers = new Array();
|
var timers = new Array();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue