]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/commitdiff
Bug fix for __new__ running before __init__
authorMelissa LeBlanc-Williams <melissa@adafruit.com>
Fri, 29 Sep 2023 02:24:20 +0000 (19:24 -0700)
committerMelissa LeBlanc-Williams <melissa@adafruit.com>
Fri, 29 Sep 2023 02:24:20 +0000 (19:24 -0700)
displayio/_epaperdisplay.py

index d7a60374d134e0651daf93796f34f63d52ab6971..b536d52304fa02e306681a5cb9cddd5ac8134e15 100644 (file)
@@ -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