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

add displayRegional method #235

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

Conversation

DeqingSun
Copy link

update region instead of full screen to save time. In my test, this improvement saves 95% communication time to update a parameter on a 128x64 display, and solves the audio glitch issue.

Tested on 128x64 I2C display, SPI not tested but should work.

update region instead of full screen to save time
@ladyada
Copy link
Member

ladyada commented Mar 6, 2022

hi thanks for the pr! we do have this idea but it would be implemented as window tracking - ideally this library would be refactored to subclass https://github.com/adafruit/Adafruit-GFX-Library/blob/master/Adafruit_GrayOLED.cpp (or, for now, that capability added here) instead of manually trakcing update rectangles!

@DeqingSun
Copy link
Author

Great I saw the variables window_x1, etc. That is definitely easier for graphics application. However for text application, I do need to draw a rectangle to do a local erase before update text. So the manually tracking is pretty straight forward.

But even window_x1 get fully implemented, the library still need to do the job like this function? There can be another function call the displayRegional with variables window_x1.

@ladyada
Copy link
Member

ladyada commented Mar 7, 2022

i would really prefer not to add it because no other OLED driver does it. i think window tracking will give very significant speedups!

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