adafruit / Adafruit_EPD

e-paper display driver for Arduino
140 stars 56 forks source link

Now its sending the resolution to the display #67

Open lisbravo opened 2 years ago

lisbravo commented 2 years ago

The UC8151D driver was not working properly with the 2,13 inch flex Epaper Display, connected to a eInk Breakout Friend. Tested on a few different boards. The cause of this was that the driver needs to send the resolution of the display to the driver IC, which is what this commit fixes.

Haven't tested partial initialization though, when I get to the point of needing that, if there is any further work to do, I'll submit another commit.

As always, thanks for such a great job 😄

ladyada commented 2 years ago

can we do it without two new variables? we already have width and height as class variables?

lisbravo commented 2 years ago

can we do it without two new variables? we already have width and height as class variables?

Please correct me if Im wrong, but width and height are parameters of the constructor and not actual class members, and as such they cannot (or should not) be accessed by other class functions. But maybe Im missing something ...

mirzafahad commented 1 year ago

@lisbravo You can call width() and height() to get the width and height that were specified when the Adafruit_UC8151D instance was created. Width and height propagate to Adafruit_EPD' and then toAdafruit_Gfx`.

lisbravo commented 1 year ago

@mirzafahad Thanks man @ladyada pls have a look, unfortunately I don't have the HW available anymore but this is a minor change from my initial, HW verified, pull request

ladyada commented 1 year ago

thanks, we'll test this on hardware!