X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/5cfe68b419b1e014ae334c500569d87b661e4281..1b32b9777b008a2a882d969761591ace80d366da:/displayio/display.py diff --git a/displayio/display.py b/displayio/display.py index 6bc5039..904302b 100644 --- a/displayio/display.py +++ b/displayio/display.py @@ -21,7 +21,7 @@ # THE SOFTWARE. """ -`displayio` +`displayio.display` ================================================================================ displayio for Blinka @@ -40,12 +40,14 @@ import struct import threading from PIL import Image import numpy -from displayio import Rectangle -from displayio import displays +from recordclass import recordclass __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/adafruit/Adafruit_Blinka_displayio.git" +Rectangle = recordclass("Rectangle", "x1 y1 x2 y2") +displays = [] + # pylint: disable=unnecessary-pass, unused-argument # pylint: disable=too-many-instance-attributes @@ -202,7 +204,7 @@ class Display: self._current_group._fill_area(buffer) # pylint: disable=protected-access # save image to buffer (or probably refresh buffer so we can compare) self._buffer.paste(buffer) - time.sleep(1) + # Eventually calculate dirty rectangles here self._subrectangles.append(Rectangle(0, 0, self._width, self._height)) @@ -229,13 +231,13 @@ class Display: self._write( self._set_column_command, self._encode_pos( - rectangle.x1 + self._colstart, rectangle.x2 + self._colstart + rectangle.x1 + self._colstart, rectangle.x2 + self._colstart - 1 ), ) self._write( self._set_row_command, self._encode_pos( - rectangle.y1 + self._rowstart, rectangle.y2 + self._rowstart + rectangle.y1 + self._rowstart, rectangle.y2 + self._rowstart - 1 ), ) self._write(self._write_ram_command, pixels)