From 0187bca55f40e90d114f7e23d32d3ac920b5b6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9=20=23openToWork-Paris?= Date: Fri, 4 Apr 2025 22:15:17 +0200 Subject: [PATCH] inky/impression: fix init of bounds (#102) Fix typo in initialization of bounds when bounds are not explicitely set by the user. --- inky/impression.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inky/impression.go b/inky/impression.go index 1572b25..0107af5 100644 --- a/inky/impression.go +++ b/inky/impression.go @@ -205,7 +205,7 @@ func NewImpression(p spi.Port, dc gpio.PinOut, reset gpio.PinOut, busy gpio.PinI d.res = 0b11 } // Prefer the passed in values via Opts. - if o.Width == 0 && o.Height == 0 { + if o.Width != 0 && o.Height != 0 { d.width = o.Width d.height = o.Height }