Merge pull request #8 from aydogankaragoz/master

Fixed channel NaN issue for 5Ghz networks.
This commit is contained in:
Christian Kuster 2019-09-21 11:21:45 +02:00 committed by GitHub
commit d1eac84058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,8 +43,8 @@ function parseOutput(str, callback) {
} }
// Channel, an ugly thing to get it // Channel, an ugly thing to get it
else if (_.startsWith(line.trim(), 'Frequency:')) { else if (_.startsWith(line.trim(), 'Channel:')) {
network.channel = parseInt(_.trim(line, ' )').split(/Channel/)[1], 10); network.channel = parseInt(_.trim(line, ' )').split(/:/)[1]);
} }
// Another ugly thing, the signal which can have different formats, even worse als // Another ugly thing, the signal which can have different formats, even worse als