Closed hermanbanken closed 5 years ago
I will check with the latest version of the jgarff/rpi_ws281x library.
(I used a fresh clone)
Above error was using a fresh clone of jgarff/rpi_ws281x
Using the submodule version I get this:
*****************************
* rpi_ws281x Hardware Check *
*****************************
Hardware Type : 1
Hardware Version : 0x00000010
Periph base : 0x20000000
Video core base : 0x40000000
Description : Model B+
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xaf390]
goroutine 7 [running]:
github.com/rpi-ws281x/rpi-ws281x-go.(*WS2811).Init(0x1846400, 0x0, 0x182af88)
/home/pi/q070-slide/balena/go-slide/vendor/github.com/rpi-ws281x/rpi-ws281x-go/ws2811_arm.go:117 +0x100
Note: this happens when selecting pin 10 (SPI) for output. If I use the default value (PWM?) it does not crash.
But sudo ./test --width 1 --height 250 --gpio 10
(SPI) just works.
I am getting this output from rpi-ws281x-go:
The struct is setup like this:
Happening here: https://github.com/rpi-ws281x/rpi-ws281x-go/blob/669a4f9a7e1f167b7e9b5b0b781c1b83e470e6fa/ws2811_arm.go#L113-L117
I don't know how to fix those lines 😢
Getting the exact same error when running examples/color_wipe by the way.