Update neopixel.js to fix detection of RPi CM4 with Bookworm (#1098)

My CM4 Module has in /proc/cpuinfo no " : BCM" text string, so the check for RPi fails.
Instead it has a Model  " : Raspberry Pi Compute Module 4 Rev 1.1" string. 
The Check was updated to use BCM or "Raspberry Pi" to check for Raspberry Pi Hardware.
This commit is contained in:
Flos
2025-06-25 00:15:08 +02:00
committed by GitHub
parent 075be0a207
commit 940bf18a1e

View File

@@ -10,7 +10,7 @@ module.exports = function(RED) {
try {
var cpuinfo = fs.readFileSync("/proc/cpuinfo").toString();
if (cpuinfo.indexOf(": BCM") === -1) {
if (cpuinfo.indexOf(": BCM") === -1 && cpuinfo.indexOf(": Raspberry Pi") === -1)) {
RED.log.warn("rpi-neopixels : "+RED._("node-red:rpi-gpio.errors.ignorenode"));
allOK = false;
}