From acbd55943632b5998a5e8e0f2f26eb24ca211cc4 Mon Sep 17 00:00:00 2001 From: Nathan Date: Sun, 15 Jan 2023 03:52:59 +0000 Subject: [PATCH] big time risk --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8689ee2..7d545fe 100644 --- a/main.go +++ b/main.go @@ -69,10 +69,13 @@ func main() { m, err := rgbmatrix.NewRGBLedMatrix(config) fatal(err) mqMessages := make(chan mqtt.Message) + log.Println("making listener") go listener(mqMessages) tk := rgbmatrix.NewToolKit(m) defer tk.Close() + log.Println("making animator") go animator(tk, mqMessages) + log.Println("I guess I'm at the end") } func listener(mqMessages chan mqtt.Message) { @@ -83,6 +86,7 @@ func listener(mqMessages chan mqtt.Message) { log.Println(fmt.Sprintf("failed to connect to mq: %s", token.Error().Error())) panic(token.Error()) } + log.Println("connected") client.Subscribe(topic, 0, func(client mqtt.Client, msg mqtt.Message) { log.Println("Receiving ", string(msg.Payload()), " on topic: ", msg.Topic()) mqMessages <- msg @@ -90,7 +94,6 @@ func listener(mqMessages chan mqtt.Message) { } func animator(tk *rgbmatrix.ToolKit, mqMessages chan mqtt.Message) { - tk.PlayAnimation(NewAnimation(image.Point{64, 32}, mqMessages)) }