From 3cc9114471d33a078a1cf94e45fe85965437b4ab Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 28 Sep 2023 19:24:20 -0700 Subject: [PATCH] Bug fix for __new__ running before __init__ --- displayio/_epaperdisplay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.49.0