From 5ac43e9b46b740dbb51a6e0bcfc77ea66ca82210 Mon Sep 17 00:00:00 2001 From: Brendan Porter Date: Fri, 17 Aug 2018 15:10:48 -0500 Subject: [PATCH] GPIO slowdown fix in place, cleaning up changes --- matrix.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/matrix.go b/matrix.go index f602b15..5ed9abb 100644 --- a/matrix.go +++ b/matrix.go @@ -169,7 +169,7 @@ func stringsToC(s []string) **C.char { } // 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() { if r := recover(); r != nil { var ok bool @@ -185,10 +185,8 @@ func NewRGBLedMatrix(config *HardwareConfig, argc *int, argv *[]string) (c Matri } w, h := config.geometry() - cargc := C.int(*argc) - cargv := stringsToC(*argv) - fmt.Printf("ArgV: %#v", *argv) - fmt.Printf("CArgV: %#v", **cargv) + cargc := C.int(len(os.Args)) + cargv := stringsToC(os.Args) m := C.led_matrix_create_from_options(config.toC(), &cargc, &cargv) b := C.led_matrix_create_offscreen_canvas(m) c = &RGBLedMatrix{