-
Notifications
You must be signed in to change notification settings - Fork 53
HX8357: Mirroring and Color issues #128
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
Comments
That's it! I tried with I'm still not sure, whether I should close this issue, since this feels a lot like a workaround to change these values. Shouldn't one expect to have the correct values for the according screens? |
@Tetrikus What kind of displays do you have? Are they Adafruit hardware? or if not where did they come from. Can you post a photo? If they are from another source it may just be that they are configured differently from the Adafruit breakouts that use this display driver. I tested this library by running a slightly modified version of: https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/blob/main/examples/rgb_display_hx8357test.py on https://www.adafruit.com/product/3651 I changed the location of the single pixel plot to place it along different edges and corners of the display to verify the mirroring behavior. In my case with this setup the display is working correctly, both color and pixel positions with the default values that are currently in the driver code with no modifications. If different configurations of display are prevalent perhaps we'd be willing to accept a PR that adds an argument to the constructor to allow user code to pass this value in. It'll be slightly tricky in that it needs to iterate |
If I just use the library as it is, my displays (HX8357d) have two issues:
I tried the following:
Adafruit_CircuitPython_RGB_Display/adafruit_rgb_display/hx8357.py
Line 96 in 2c4d380
I changed
(_MADCTL, b"\xa0")
to(_MADCTL, b"\x20")
This fixes the mirroring of the image.
But the colors are still behaving odd. Some JPG images are displayed correct (does this make any sense?). But most (PNG and JPG) look inverted (except white and black). Also, if I draw text, the colors are displayed in BGR instead of RGB. Any idea how I could adapt the library to fix this as well?
The text was updated successfully, but these errors were encountered: