system() raspberry PI detection improved
This commit is contained in:
parent
0845e034f0
commit
348c6cf77e
@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| 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.5 | 2025-01-07 | `shell()` detect powerShell (windows) |
|
||||||
| 5.25.4 | 2025-01-06 | `versions()` improved powerShell parsing (windows) |
|
| 5.25.4 | 2025-01-06 | `versions()` improved powerShell parsing (windows) |
|
||||||
| 5.25.3 | 2025-01-05 | `memLayout()` improved speed parsing (windows) |
|
| 5.25.3 | 2025-01-05 | `memLayout()` improved speed parsing (windows) |
|
||||||
|
|||||||
@ -57,6 +57,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>
|
<tr>
|
||||||
<th scope="row">5.25.5</th>
|
<th scope="row">5.25.5</th>
|
||||||
<td>2024-01-07</td>
|
<td>2024-01-07</td>
|
||||||
|
|||||||
@ -170,7 +170,7 @@
|
|||||||
<img class="logo" src="assets/logo.png" alt="logo">
|
<img class="logo" src="assets/logo.png" alt="logo">
|
||||||
<div class="title">systeminformation</div>
|
<div class="title">systeminformation</div>
|
||||||
<div class="subtitle"><span id="typed"></span> </div>
|
<div class="subtitle"><span id="typed"></span> </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>
|
<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>
|
||||||
<div class="down">
|
<div class="down">
|
||||||
|
|||||||
@ -189,7 +189,7 @@ function system(callback) {
|
|||||||
const model = util.getValue(lines, 'model:', ':', true);
|
const model = util.getValue(lines, 'model:', ':', true);
|
||||||
// reference values: https://elinux.org/RPi_HardwareHistory
|
// reference values: https://elinux.org/RPi_HardwareHistory
|
||||||
// https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
|
// 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);
|
const rPIRevision = util.decodePiCpuinfo(lines);
|
||||||
result.model = rPIRevision.model;
|
result.model = rPIRevision.model;
|
||||||
result.version = rPIRevision.revisionCode;
|
result.version = rPIRevision.revisionCode;
|
||||||
|
|||||||
@ -661,7 +661,8 @@ function isRaspberry() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hardware = getValue(cpuinfo, 'hardware');
|
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() {
|
function isRaspbian() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user