Skip to content

Conversation

jaeheonshim
Copy link
Contributor

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".

@Gadgetoid
Copy link
Member

Thank you! I'll have to check if this has any impact on our MicroPython builds, but it otherwise looks good.

@Gadgetoid Gadgetoid merged commit f7c45a9 into pimoroni:main Jan 15, 2025
15 checks passed
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.

2 participants