memLayout() raspberry PI mem voltage fix

This commit is contained in:
Sebastian Hildebrandt 2020-02-20 08:15:01 +01:00
parent affaef90a3
commit be1bd305ce
5 changed files with 12 additions and 6 deletions

View File

@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 4.22.2 | 2020-02-20 | `memLayout()` raspberry PI mem voltage fix |
| 4.22.1 | 2020-02-17 | `memLayout()` raspberry PI support |
| 4.22.0 | 2020-02-17 | `services()` added pids (windows) |
| 4.21.3 | 2020-02-16 | `versions()` fixed mysql version (macOS) |

View File

@ -85,13 +85,13 @@ si.cpu()
(last 7 major and minor version releases)
- Version 4.22.0: `services()` added pids (windows)
- Version 4.21.0: added npx copmpatibility
- Version 4.20.0: `battery()` added designcapacity, voltage, unit
- Version 4.19.0: `osInfo()` added uefi (OS uses UEFI during startup)
- Version 4.18.0: `networkInterfaces()` added dhcp for mac os, added dhcp linux fallback
- Version 4.17.0: `networkInterfaces()` added dhcp, dnsSuffix, ieee8021xAuth, ieee8021xState
- Version 4.16.0: `networkGatewayDefault()` added
- Version 4.15.0: `cpu()` added governor (linux)
- ...
You can find all changes here: [detailed changelog][changelog-url]

View File

@ -83,6 +83,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">4.22.2</th>
<td>2020-02-19</td>
<td><span class="code">memLayout()</span> raspberry PI mem voltage fix</td>
</tr>
<tr>
<th scope="row">4.22.1</th>
<td>2020-02-17</td>

View File

@ -168,7 +168,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span></div>
<div class="version">Current Version: <span id="version">4.22.1</span></div>
<div class="version">Current Version: <span id="version">4.22.2</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -359,11 +359,11 @@ function memLayout(callback) {
stdout = execSync('vcgencmd measure_volts sdram_p 2>/dev/null');
lines = stdout.toString().split('\n');
let voltage = parseInt(util.getValue(lines, 'sdram_freq', '=', true), 10) || 0;
let voltage = parseFloat(util.getValue(lines, 'volt', '=', true), 10) || 0;
if (voltage) {
result.voltageConfigured = voltage;
result.voltageMin = voltage;
result.voltageMax = voltage;
result[0].voltageConfigured = voltage;
result[0].voltageMin = voltage;
result[0].voltageMax = voltage;
}
}
} catch (e) {