From 7d4927eb320b6269d83f63ee67e284857c552e9d Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Tue, 13 Oct 2020 18:23:42 +0200 Subject: [PATCH] now --- dashboard_api/hat/unicorn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dashboard_api/hat/unicorn.py b/dashboard_api/hat/unicorn.py index 7b8caec..c6e0beb 100644 --- a/dashboard_api/hat/unicorn.py +++ b/dashboard_api/hat/unicorn.py @@ -136,12 +136,12 @@ class UnicornHat(object): """Output the contents of the buffer to Unicorn HAT HD.""" ########################################################## ## Change to desire - _buf1 = numpy.rot90(self.buffer[:16,:self.HEIGHT],2) - _buf2 = numpy.rot90(self.buffer[16:32,:self.HEIGHT],2) + buff1 = numpy.rot90(self.buffer[:self.HEIGHT,:16],2) + buff2 = numpy.rot90(self.buffer[:self.HEIGHT,16:32],2) ########################################################## - _buf1, _buf2 = _buf1, _buf2 = [(x.reshape(768) * self.brightness).astype(numpy.uint8).tolist() for x in (_buf1, _buf2)] + # buff1, buff2 = [(x.reshape(768) * self.brightness).astype(numpy.uint8).tolist() for x in (buff1, buff2)] - self.spi_write(_buf1, _buf2) + self.spi_write(buff1, buff2) time.sleep(self.DELAY)