Closed Johboh closed 1 year ago
Maybe I didn't test rotation right. Will take a look but I don't have one of this with 2 colors. What you can try and fix it yourself since this was a external contribution that I approved but never had a display to test.
Just try to invert the update loop (check it also for red since it has 2 buffers) https://github.com/martinberlin/cale-idf/blob/master/components/CalEPD/models/color/gdeh0154z90.cpp#L100
// REVERSE either x or y but start with Y:
for (uint16_t y = GDEH0154Z90_HEIGHT; y > 0; y--)
{
for (uint16_t x = 0; x < xLineBytes; x++)
{
uint16_t idx = y * xLineBytes + x;
x1buf[x] = (idx < sizeof(_mono_buffer)) ? ~ _mono_buffer[idx] : 0xFF;
}
// Flush the X line buffer to SPI
IO.data(x1buf, sizeof(x1buf));
}
As a reference check gdey0154d67 If that works please test all rotation modes to see it works as expected (Write 2 lines one in each color) And then please make a Merge Request so you contribute to fix the issue.
If you manage to solve it then I will try it with a similar display but only black and merge it.
- - - - If this works you don't have to do anything: FIX proposed in develop branch Please switch to that branch and test it, also with red, and different rotations. Thanks for your time
@martinberlin I cherry picked your commit and now the text is correct, thanks! I also verified black and red colors as well as that all rotations where correct.
Thanks for the test. Will merge it into master soon! Mind that to use this as a component you need to use CalEPD that is in a different repository. Is easier and lighter. Moving this update there also quite soon
Yes I'm using CalEPD and Adafruit GFX IDF as components in the project.
Latest this weekend develop is merged in master here and then I copy the contents to CalEPD and make a new release
Hi! I have a issue where the text I'm printing is mirrored, and I have a bit of a struggle trying to find out why. This is the code (from small-display.cpp)
This is for when using this component (@master branch) together with Adafruit GFX IDF@master in an ESP-IDF (v.4.4.4) + Visual Studio Code project.![PXL_20230517_135538700](https://github.com/martinberlin/cale-idf/assets/4701462/bb69f9c3-ee11-4137-ba91-717b3cd2dcda)
However, If I setup a platform I/O Arduino project and uses zinggjm/GxEPD with the same code (and same device and display), the text is correct. Note that in this case I don't need to set the rotation.
I'm most probably missing something here. What could cause this?