system() raspberry PI detection improved

This commit is contained in:
Sebastian Hildebrandt 2025-01-08 22:11:27 +01:00
parent 0845e034f0
commit 348c6cf77e
5 changed files with 10 additions and 3 deletions

View File

@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved |
| 5.25.5 | 2025-01-07 | `shell()` detect powerShell (windows) |
| 5.25.4 | 2025-01-06 | `versions()` improved powerShell parsing (windows) |
| 5.25.3 | 2025-01-05 | `memLayout()` improved speed parsing (windows) |

View File

@ -57,6 +57,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.25.6</th>
<td>2024-01-08</td>
<td><span class="code">system()</span> raspberry pi detection improved</td>
</tr>
<tr>
<th scope="row">5.25.5</th>
<td>2024-01-07</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
3<div class="version">New Version: <span id="version">5.25.5</span></div>
3<div class="version">New Version: <span id="version">5.25.6</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

@ -189,7 +189,7 @@ function system(callback) {
const model = util.getValue(lines, 'model:', ':', true);
// reference values: https://elinux.org/RPi_HardwareHistory
// https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
if ((result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2710' || result.model === 'BCM2711' || result.model === 'BCM2836' || result.model === 'BCM2837') && model.toLowerCase().indexOf('raspberry') >= 0) {
if ((result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2710' || result.model === 'BCM2711' || result.model === 'BCM2836' || result.model === 'BCM2837' || result.model === '') && model.toLowerCase().indexOf('raspberry') >= 0) {
const rPIRevision = util.decodePiCpuinfo(lines);
result.model = rPIRevision.model;
result.version = rPIRevision.revisionCode;

View File

@ -661,7 +661,8 @@ function isRaspberry() {
}
const hardware = getValue(cpuinfo, 'hardware');
return (hardware && PI_MODEL_NO.indexOf(hardware) > -1);
const model = getValue(cpuinfo, 'model');
return ((hardware && PI_MODEL_NO.indexOf(hardware) > -1) || (model && model.indexOf('Raspberry Pi') > -1));
}
function isRaspbian() {