Skip to content

Commit 940bf18

Browse files
authored
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.
1 parent 075be0a commit 940bf18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hardware/neopixel/neopixel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function(RED) {
1010

1111
try {
1212
var cpuinfo = fs.readFileSync("/proc/cpuinfo").toString();
13-
if (cpuinfo.indexOf(": BCM") === -1) {
13+
if (cpuinfo.indexOf(": BCM") === -1 && cpuinfo.indexOf(": Raspberry Pi") === -1)) {
1414
RED.log.warn("rpi-neopixels : "+RED._("node-red:rpi-gpio.errors.ignorenode"));
1515
allOK = false;
1616
}

0 commit comments

Comments
 (0)