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

With fixed overlay and division by zero fixed #358

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

BbIKTOP
Copy link

@BbIKTOP BbIKTOP commented Oct 12, 2021

Resolves #356:

3 methods added to the API:

void setFixedOverlay(FixedOverlayCallback fixedOverlayCallback) to set fixed overlay drawing foo.

void setFixedOverlayFrames(const FrameCallback* fixedOverlayFramesList, int noOverlayFramesCount) to set the list of frames on which this fixed overlay will be drawn (by specifying frames callbacks, which could be useful during list changes).

void setFixedOverlayFrames(int* fixedOverlayFramesList, int noOverlayFramesCount) to set the list of frames on which this fixed overlay will be drawn (by specifying frames numbers)

Usage example:

FrameCallback frames[] =
    {
        frame1,
        frame2,
        frame3,
        frame4,
        frame5};
int framesCount = 5;

...

    ui.setFixedOverlay(someOverlayFoo);
    ui.setFixedOverlayFrames((const FrameCallback[]){frame2, frame3, frame5}, 3);
// or
    ui.setFixedOverlayFrames((const uint8_t[]){1, 2, 4}, 3);

@marcelstoer
Copy link
Member

Looking good, thanks! Please add an example sketch that demonstrates how to use this and some documentation to the README. Maybe an animated GIF for the README?

@@ -42,6 +42,8 @@

#include "OLEDDisplay.h"

#include <stdlib.h>
Copy link
Member

Choose a reason for hiding this comment

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

What do you need this one for?

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, there’s a war in Ukraine and my Ukrainian home has been destroyed by russian nazi so I cannot check. I suppose, vscode added it automatically for some call. Could you check it please. It’s easy - just comment it out and try to compile

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.

Overlay for particular frames only
2 participants