From ddb626ac4f1cb69d50d4c6581017e5b50c2135eb Mon Sep 17 00:00:00 2001 From: Gregor Riepl Date: Wed, 5 May 2021 23:21:02 +0200 Subject: [PATCH] Fixed command error handling --- uncanny/display.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uncanny/display.go b/uncanny/display.go index f7081ba..61ab621 100644 --- a/uncanny/display.go +++ b/uncanny/display.go @@ -31,7 +31,10 @@ func (c *Can) DisplayWrite(line int, a []byte) error { // print in separate chunks, as one frame payload is limited to 7 bytes // the display has only 16 characters per line, so we truncate there for i := 0; i < len(a) && i < 16; i += 7 { - return c.bus.Publish(DisplayCommand{addr, a[i:i+7]}.Encode()) + err := c.bus.Publish(DisplayCommand{addr, a[i:i+7]}.Encode()) + if err != nil { + return err + } } return nil }