systeminformation 5.21.24 → 5.21.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/wifi.js +5 -2
- package/package.json +1 -1
package/lib/wifi.js
CHANGED
|
@@ -25,7 +25,10 @@ const _darwin = (_platform === 'darwin');
|
|
|
25
25
|
const _windows = (_platform === 'win32');
|
|
26
26
|
|
|
27
27
|
function wifiDBFromQuality(quality) {
|
|
28
|
-
|
|
28
|
+
const qual = parseFloat(quality);
|
|
29
|
+
if (qual < 0) { return 0; }
|
|
30
|
+
if (qual >= 100) { return -50; }
|
|
31
|
+
return (qual / 2 - 100);
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
function wifiQualityFromDB(db) {
|
|
@@ -658,7 +661,7 @@ function wifiConnections(callback) {
|
|
|
658
661
|
const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : '';
|
|
659
662
|
const ssid = util.getValue(lines, 'SSID', ':', true);
|
|
660
663
|
const bssid = util.getValue(lines, 'BSSID', ':', true);
|
|
661
|
-
const signalLevel = util.getValue(lines, 'Signal', ':', true);
|
|
664
|
+
const signalLevel = wifiDBFromQuality(util.getValue(lines, 'Signal', ':', true));
|
|
662
665
|
const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null;
|
|
663
666
|
const security = util.getValue(lines, 'authentication', ':', true) || util.getValue(lines, 'Authentification', ':', true) || util.getValue(lines, 'Authentifizierung', ':', true) || null;
|
|
664
667
|
const channel = util.getValue(lines, 'Channel', ':', true) || util.getValue(lines, 'Canal', ':', true) || util.getValue(lines, 'Kanal', ':', true) || null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.21.
|
|
3
|
+
"version": "5.21.25",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|