From: Melissa LeBlanc-Williams Date: Fri, 29 Sep 2023 02:24:20 +0000 (-0700) Subject: Bug fix for __new__ running before __init__ X-Git-Tag: 1.1.0^2~15 X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/commitdiff_plain/3cc9114471d33a078a1cf94e45fe85965437b4ab Bug fix for __new__ running before __init__ --- diff --git a/displayio/_epaperdisplay.py b/displayio/_epaperdisplay.py index d7a6037..b536d52 100644 --- a/displayio/_epaperdisplay.py +++ b/displayio/_epaperdisplay.py @@ -158,6 +158,7 @@ class EPaperDisplay: if rotation % 90 != 0: raise ValueError("Display rotation must be in 90 degree increments") + self._refreshing = False color_depth = 1 core_grayscale = True @@ -210,7 +211,6 @@ class EPaperDisplay: self._color_bits_inverted = color_bits_inverted self._refresh_time_ms = refresh_time * 1000 self._busy_state = busy_state - self._refreshing = False self._milliseconds_per_frame = seconds_per_frame * 1000 self._chip_select = ( CHIP_SELECT_TOGGLE_EVERY_BYTE @@ -241,6 +241,7 @@ class EPaperDisplay: ) display_instance = super().__new__(cls) + display_instance._refreshing = False allocate_display(display_instance) return display_instance