File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,11 @@ def __init__(
238
238
display .show (self ._group )
239
239
240
240
self ._backlight_pwm = backlight_pwm
241
- if not backlight_pwm and fade_effect :
241
+ if (
242
+ not backlight_pwm
243
+ and fade_effect
244
+ and hasattr (self ._display , "auto_brightness" )
245
+ ):
242
246
self ._display .auto_brightness = False
243
247
244
248
# Show the first image
@@ -276,7 +280,7 @@ def _set_backlight(self, brightness):
276
280
else :
277
281
try :
278
282
self ._display .brightness = brightness
279
- except RuntimeError :
283
+ except ( RuntimeError , AttributeError ) :
280
284
pass
281
285
282
286
@property
@@ -316,7 +320,6 @@ def update(self):
316
320
now = time .monotonic ()
317
321
if not self .auto_advance or now - self ._img_start < self .dwell :
318
322
return True
319
-
320
323
return self .advance ()
321
324
322
325
# pylint: disable=too-many-branches
@@ -380,6 +383,8 @@ def advance(self):
380
383
)
381
384
self ._group .append (sprite )
382
385
386
+ if hasattr (self ._display , "refresh" ):
387
+ self ._display .refresh ()
383
388
self ._fade_up ()
384
389
self ._img_start = time .monotonic ()
385
390
You can’t perform that action at this time.
0 commit comments