ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
1.98k stars 636 forks source link

Overlay for particular frames only #356

Open BbIKTOP opened 2 years ago

BbIKTOP commented 2 years ago

Sorry, didn't find any other places to ask. It's more like feature reques, probably, but maybe it is already implemented. Is it possible to set the overlay for some particular frames only? Like, frame 1 has no overlay, frame 2, 3 and 4 have, and frames 5 and 6 have no overlay as well as first one. During transition from 1 to 2, overlay appears scrolling together with 2, then stays as usual overlay on transition 2-3 and 3-4, then scrolls out of the screen with frame 4 during 4-5 transition and does not appear while scrolling from 5 to 6. Is it possible to implement this somehow? Thank you!

BbIKTOP commented 2 years ago

I tried to implement this myself, but cannot find a way to determine the curent transition state. I see, there's frameState field in the OLEDDisplayUiState, but it does not indicate, does the frame scrolling into view or out of view. Is there a way to add the scrolling direction? Like

enum FrameState {
  IN_TRANSITION_IN,
  IN_TRANSITION_OUT,
  FIXED
};

Or something alike?

BbIKTOP commented 2 years ago

Any feedback?