martinberlin / CalEPD

Epaper ESP-IDF component with GFX capabilities and multi SPI support
https://fasani.de
Apache License 2.0
94 stars 11 forks source link

Grayscale support in gdew042t2Grays is no longer working #16

Closed thebitguru closed 1 year ago

thebitguru commented 1 year ago

Hi, Martin,

I noticed that the latest gdew042t2Grays.cpp breaks the grayscale support for the display. The following block that forces mono mode (also the default mode) displays the "Starting..." text.

    display.init(false);
    display.setMonoMode(true);
    display.fillScreen(EPD_BLACK);
    display.setTextColor(EPD_WHITE);
    display.drawString(130, 200, "Starting...");
    display.update();

But when I disable the mono mode (i.e., enable grayscale) then it doesn't display anything. Note that I didn't even change the colors in this case to keep it simple.

    display.init(false);
    display.setMonoMode(false);
    display.fillScreen(EPD_BLACK);
    display.setTextColor(EPD_WHITE);
    display.drawString(130, 200, "Starting...");
    display.update();

Note that in the above code display is a very simple wrapper for Gdew042t2Grays that only adds additional functions.

Any ideas on what might be going on here? Here is the datasheet for reference.

martinberlin commented 1 year ago

Hello @thebitguru this time you will have to debug it yourself since I do not own anymore (And won't buy anymore SPI epapers) since I'm focused on helping another projects for a few years. But last times I tested: https://github.com/PaperMETAR/FirmwareTinker/blob/master/src/main.cpp It was working in the demos.

Debug the buffers, check start up commands, I don't think that class has changed anything since last times we checked.

martinberlin commented 1 year ago
thebitguru commented 1 year ago

Thanks for those tips. I will experiment over the next few days and report back. I will submit a PR if I am able to propose a fix.

martinberlin commented 1 year ago

Great! Thanks for your contribution. Now this will be fixed by anyone using this display and you also have your code in the contributors list. Please close it after checking again that it works as expected.

thebitguru commented 1 year ago

Confirmed against master branch. Thanks!

martinberlin commented 1 year ago

The @thebitguru I will like to see some pictures/ videos once you finish your creation! Thanks a lot for choosing our component.

thebitguru commented 1 year ago

Will do. Thanks for all your work on this library!