Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Properly implement non-blocking update functions for the Inky Frame #1042

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jaeheonshim
Copy link

While tinkering with my Inky Frame, I noticed that changing the blocking parameter of InkyFrame::update to false has no effect. To be more specific, this is the code I was running (I wanted the status LED to softly pulse while updates are happening to the e-ink display):

frame.update(false);
unsigned int b = 0;
while(frame.is_busy()) {
    frame.led(InkyFrame::LED_ACTIVITY, std::min(b, 200 - b));
    b = (b + 5) % 200;
    sleep_ms(75);
}
frame.led(InkyFrame::LED_ACTIVITY, 0);

It turns out that the blocking parameter was being completely ignored in both the inky_frame and inky_frame_7 source files. Thus, I have made a few simple fixes to make the code respect the blocking flag. Also, in inky73.cpp, busy_wait() was called whether or not blocking was set to true or false. I have removed the extra function call.

These fixes appear to make the code provided above run properly, at least on my Inky Frame 7.3".

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.

1 participant