mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-24 16:55:22 +03:00
Sync with master
This commit is contained in:
parent
f24ccfc637
commit
53aebde936
12 changed files with 1154 additions and 1133 deletions
|
@ -24,7 +24,16 @@ PortHandler.initialize = function () {
|
|||
PortHandler.check = function () {
|
||||
var self = this;
|
||||
|
||||
ConnectionSerial.getDevices(function(current_ports) {
|
||||
ConnectionSerial.getDevices(function(all_ports) {
|
||||
|
||||
// filter out ports that are not serial
|
||||
let current_ports = [];
|
||||
for (var i = 0; i < all_ports.length; i++) {
|
||||
if (all_ports[i].indexOf(':') === -1) {
|
||||
current_ports.push(all_ports[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// port got removed or initial_ports wasn't initialized yet
|
||||
if (self.array_difference(self.initial_ports, current_ports).length > 0 || !self.initial_ports) {
|
||||
var removed_ports = self.array_difference(self.initial_ports, current_ports);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue