GPIO slowdown fix in place, cleaning up changes

pull/13/head
Brendan Porter 6 years ago
parent 8cacfbb810
commit 5ac43e9b46

@ -169,7 +169,7 @@ func stringsToC(s []string) **C.char {
} }
// NewRGBLedMatrix returns a new matrix using the given size and config // NewRGBLedMatrix returns a new matrix using the given size and config
func NewRGBLedMatrix(config *HardwareConfig, argc *int, argv *[]string) (c Matrix, err error) { func NewRGBLedMatrix(config *HardwareConfig) (c Matrix, err error) {
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
var ok bool var ok bool
@ -185,10 +185,8 @@ func NewRGBLedMatrix(config *HardwareConfig, argc *int, argv *[]string) (c Matri
} }
w, h := config.geometry() w, h := config.geometry()
cargc := C.int(*argc) cargc := C.int(len(os.Args))
cargv := stringsToC(*argv) cargv := stringsToC(os.Args)
fmt.Printf("ArgV: %#v", *argv)
fmt.Printf("CArgV: %#v", **cargv)
m := C.led_matrix_create_from_options(config.toC(), &cargc, &cargv) m := C.led_matrix_create_from_options(config.toC(), &cargc, &cargv)
b := C.led_matrix_create_offscreen_canvas(m) b := C.led_matrix_create_offscreen_canvas(m)
c = &RGBLedMatrix{ c = &RGBLedMatrix{

Loading…
Cancel
Save