esp8266-oled-ssd1306 icon indicating copy to clipboard operation
esp8266-oled-ssd1306 copied to clipboard

With fixed overlay and division by zero fixed

Open BbIKTOP opened this issue 4 years ago • 1 comments

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);

BbIKTOP avatar Oct 12 '21 21:10 BbIKTOP

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?

marcelstoer avatar Jan 04 '22 19:01 marcelstoer