From 78a145dae8a65c833e4212acafbf23aa1a9d03d2 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Mon, 5 Feb 2024 19:00:44 +0000 Subject: [PATCH] debug function for message type --- animation.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/animation.go b/animation.go index 25ddc21..b6cd863 100644 --- a/animation.go +++ b/animation.go @@ -4,6 +4,7 @@ import ( "bytes" b64 "encoding/base64" "encoding/json" + "fmt" "image" "image/color" "log" @@ -105,6 +106,7 @@ func (a *Animation) Next() (image.Image, <-chan time.Time, error) { select { case msg := <-a.mqmsg: json.Unmarshal([]byte(string(msg.Payload())), &incoming) + fmt.Println(incoming.Type) if incoming.Type == "doorbell" { a.msg = string(msg.Payload()) a.ctx.DrawString(a.msg, 5, 9)