From 3cf9a475b99090d72b9992816808cbde309dcc40 Mon Sep 17 00:00:00 2001 From: Roy Hooper Date: Sun, 4 Aug 2019 11:02:33 -0400 Subject: fix 'white' byte for dotstars --- shared-module/_pixelbuf/PixelBuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared-module/_pixelbuf') diff --git a/shared-module/_pixelbuf/PixelBuf.c b/shared-module/_pixelbuf/PixelBuf.c index b7cdef483..e26f05ac3 100644 --- a/shared-module/_pixelbuf/PixelBuf.c +++ b/shared-module/_pixelbuf/PixelBuf.c @@ -47,11 +47,11 @@ void pixelbuf_set_pixel(uint8_t *buf, uint8_t *rawbuf, float brightness, mp_obj_ if (MP_OBJ_IS_INT(item)) { uint8_t *target = rawbuf ? rawbuf : buf; pixelbuf_set_pixel_int(target, mp_obj_get_int_truncated(item), byteorder); - if (dotstar) { + if (dotstar) { buf[0] = DOTSTAR_LED_START_FULL_BRIGHT; if (rawbuf) rawbuf[0] = DOTSTAR_LED_START_FULL_BRIGHT; - } + } if (rawbuf) { buf[byteorder->byteorder.r] = rawbuf[byteorder->byteorder.r] * brightness; buf[byteorder->byteorder.g] = rawbuf[byteorder->byteorder.g] * brightness; -- cgit v1.2.3