lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
356 stars 51 forks source link

ST7735 Incorrect color order BGR/RGB #83

Closed thumptech closed 2 years ago

thumptech commented 2 years ago

Describe the bug The colors are incorrect when using the DisplayST7735_128x128x16_SPI, probably all ST7735 drivers

To Reproduce I just used the driver on this module

Expected behavior The correct colors should be displayed

Please complete the following information:

Additional context Changing line 174 of lcd_st7735.inl to: 0x36, 0x01, 0b00001000, // MADCTL sets the correct bit order and fixes the problem for me by telling the controller to use RGB and not BGR

If this is specific to the board I have it would be nice to have a function in the driver to set the pixel format.

lexus2k commented 2 years ago

Please, find the fix in the latest commit 2de202c5123b8d18dee90674e21ffccb3a5552e7. Let me know the test results

    display.getInterface().setRgbMode(1); // or 0
lexus2k commented 2 years ago

Any news?

thumptech commented 2 years ago

Apologies, i have been away from work due to illness and haven't been back to test this. Thankyou for your prompt attention to this matter.

On Wed, 30 Mar 2022, 11:09 Aleksei, @.***> wrote:

Any news?

— Reply to this email directly, view it on GitHub https://github.com/lexus2k/lcdgfx/issues/83#issuecomment-1082484534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC42EXLG3DZTMCXCVY6LI63VCOLTVANCNFSM5RQDJSSQ . You are receiving this because you authored the thread.Message ID: @.***>

thumptech commented 2 years ago

I've tested the setRgbMode() function and it is working as expected. Thankyou.

lexus2k commented 2 years ago

You're welcome. Once enough new features to publish are ready, the new version of the library will be released for the Arduino Library Manager.

thumptech commented 2 years ago

Thankyou. I just checkout the repo into my ESP-IDF project so it works fine right now. There are other problems with this display, but ill come back to that and create a new issue once ive investigated it.

On Thu, 31 Mar 2022, 14:14 Aleksei, @.***> wrote:

You're welcome. Once enough new features to publish are ready, the new version of the library will be released for the Arduino Library Manager.

— Reply to this email directly, view it on GitHub https://github.com/lexus2k/lcdgfx/issues/83#issuecomment-1084027641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC42EXOLQVFBPB5XU7M5373VCUKCBANCNFSM5RQDJSSQ . You are receiving this because you modified the open/close state.Message ID: @.***>