mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-12-26 23:16:47 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user