1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 14:25:13 +03:00
This commit is contained in:
Andi Kanzler 2024-02-10 18:08:17 -03:00
parent 939f5af04b
commit f24ccfc637
96 changed files with 16438 additions and 8058 deletions

View file

@ -10,7 +10,7 @@ const ConnectionType = {
class Connection {
constructor() {
this._connectionId = false;
this._connectionId = 0;
this._openRequested = false;
this._openCanceled = false;
this._bitrate = 0;
@ -145,7 +145,6 @@ class Connection {
} else {
this._openRequested = false;
console.log('Failed to open');
googleAnalytics.sendException('FailedToOpen', false);
if (callback) {
callback(false);
}
@ -163,13 +162,11 @@ class Connection {
this.removeAllListeners();
this.disconnectImplementation(result => {
this.checkChromeLastError();
if (result) {
console.log('Connection with ID: ' + this._connectionId + ' closed, Sent: ' + this._bytesSent + ' bytes, Received: ' + this._bytesReceived + ' bytes');
} else {
console.log('Failed to close connection with ID: ' + this._connectionId + ' closed, Sent: ' + this._bytesSent + ' bytes, Received: ' + this._bytesReceived + ' bytes');
googleAnalytics.sendException('Connection: FailedToClose', false);
}
this._connectionId = false;
@ -240,12 +237,6 @@ class Connection {
}
}
checkChromeLastError() {
if (chrome.runtime.lastError) {
console.error(chrome.runtime.lastError.message);
}
}
addOnReceiveCallback(callback) {
throw new TypeError("Abstract method");
}