mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-20 14:55:15 +03:00
add 'self' back
This commit is contained in:
parent
6b99981b3b
commit
f765fd3e19
1 changed files with 3 additions and 2 deletions
|
@ -18,11 +18,12 @@ var serial = {
|
||||||
logHead: 'SERIAL: ',
|
logHead: 'SERIAL: ',
|
||||||
|
|
||||||
connect: function (path, options, callback) {
|
connect: function (path, options, callback) {
|
||||||
|
var self = this;
|
||||||
var testUrl = path.match(/^tcp:\/\/([A-Za-z0-9\.-]+)(?:\:(\d+))?$/)
|
var testUrl = path.match(/^tcp:\/\/([A-Za-z0-9\.-]+)(?:\:(\d+))?$/)
|
||||||
if (testUrl) {
|
if (testUrl) {
|
||||||
this.connectTcp(testUrl[1], testUrl[2], options, callback);
|
self.connectTcp(testUrl[1], testUrl[2], options, callback);
|
||||||
} else {
|
} else {
|
||||||
this.connectSerial(path, options, callback);
|
self.connectSerial(path, options, callback);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
connectSerial: function (path, options, callback) {
|
connectSerial: function (path, options, callback) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue