Open DeqingSun opened 2 years ago
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!
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.
i would really prefer not to add it because no other OLED driver does it. i think window tracking will give very significant speedups!
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.