Skip to content

Conversation

jepler
Copy link

@jepler jepler commented Jul 20, 2020

While investigating #3173 I found that the display would usually stop auto-refreshing after soft reset. This stemmed from not correctly clearing the state of tasks that were queued at that moment. In theory, it could have caused #3173 as well depending on the order in which multiple background callbacks were added, and not happen consistently.

This also fixes a potential problem with framebufferio auto refresh over soft reset, by making the code match displayio.

Testing performed: soft-reset a pygamer repeatedly, both with the auto_refresh flag = True and = False via REPL. Display continued to refresh consistently.

jepler added 3 commits July 20, 2020 08:44
Before this, a background callback that was on the list when
background_callback_reset was called could have ended up in a state
that made it "un-queueable": its "prev" pointer could have been non-NULL.
It's perfectly OK for these variables with static linkage to have the
same name, but it's inconvenient for humans like me.
if we don't set the flag via accessor fn the tick enable might become wrong
@jepler jepler requested a review from tannewt July 20, 2020 14:10
@FoamyGuy
Copy link
Collaborator

I tested out this build on my PyPortal and it does seem to resolve the issue that I noticed on my PyPortal that was noted in #3173

Using this build I can now get into REPL and use it normally with no freezing or crashing of any sort.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit e759769 into adafruit:main Jul 20, 2020
@jepler jepler deleted the background-callback-bugs branch November 3, 2021 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants