Skip to content
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

spi_lcd_touch example: wrong colors with ILI9341 display (IDFGH-8811) #10242

Closed
3 tasks done
abusca opened this issue Nov 24, 2022 · 10 comments
Closed
3 tasks done

spi_lcd_touch example: wrong colors with ILI9341 display (IDFGH-8811) #10242

abusca opened this issue Nov 24, 2022 · 10 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@abusca
Copy link

abusca commented Nov 24, 2022

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.0-rc1

Operating System used.

macOS

How did you build your project?

Eclipse IDE

If you are using Windows, please specify command line type.

No response

Development Kit.

ESP32-2432S028

Power Supply used.

USB

What is the expected behavior?

I expected to see the dash board with correct colors. For example, the arc and tick lines at the end of the scale should be red.

What is the actual behavior?

Some colors are not correct. For example, the arc and tick lines at the end of the scale are shown yellow.

Steps to reproduce.

I took spi_lcd_touch example and I only modified LCD pinout defines with the ones of ESP32-2432S028 board.

Debug Logs.

No response

More Information.

No response

@abusca abusca added the Type: Bug bugs in IDF label Nov 24, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 24, 2022
@github-actions github-actions bot changed the title spi_lcd_touch example: wrong colors with ILI9341 display spi_lcd_touch example: wrong colors with ILI9341 display (IDFGH-8811) Nov 24, 2022
@suda-morris
Copy link
Collaborator

please try to turn on or off the CONFIG_LV_COLOR_16_SWAP option

@abusca
Copy link
Author

abusca commented Nov 25, 2022

CONFIG_LV_COLOR_16_SWAP is enabled by default. If I turn it off, I see even weirder colors.

CONFIG_LV_COLOR_16_SWAP ON:
CONFIG_LV_COLOR_16_SWAP ON

CONFIG_LV_COLOR_16_SWAP OFF:
CONFIG_LV_COLOR_16_SWAP OFF

@espzav
Copy link
Collaborator

espzav commented Nov 25, 2022

@abusca The first image looks good. I have it same:
20221125_145251

@espzav
Copy link
Collaborator

espzav commented Nov 25, 2022

@abusca The example is universal for two LCD controllers and the default CONFIG_LV_COLOR_16_SWAP is disabled for another LCD controller. If you enable it, it is ok for ILI9341.

@abusca
Copy link
Author

abusca commented Nov 25, 2022

@abusca The first image looks good. I have it same:
20221125_145251

Shouldn't those lines and arc be in red?

indic = lv_meter_add_scale_lines(meter, scale, lv_palette_main(LV_PALETTE_RED), lv_palette_main(LV_PALETTE_RED), false, 0);

@espzav
Copy link
Collaborator

espzav commented Nov 25, 2022

@abusca I tried another project with image and you are right, there is some problem with colors. I am sorry, I didn't see before. I will fix it soon.

@espressif-bot espressif-bot added Status: Selected for Development Issue is selected for development and removed Status: Opened Issue is new labels Nov 28, 2022
@espzav
Copy link
Collaborator

espzav commented Nov 28, 2022

Hi @abusca, the component ILI9341 was fixed, but the example has still bad rgb_endian. The merge request of the example is waiting for approve. You should use this .rgb_endian = LCD_RGB_ENDIAN_BGR, in the example.
The CONFIG_LV_COLOR_16_SWAP should be enabled (as default in example).

This is the new fixed result:
20221128_092748

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Selected for Development Issue is selected for development labels Nov 28, 2022
@abusca
Copy link
Author

abusca commented Nov 28, 2022

Thank you @espzav

@espzav
Copy link
Collaborator

espzav commented Nov 28, 2022

@abusca You are welcome.

@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Reviewing Issue is being reviewed Resolution: NA Issue resolution is unavailable labels Dec 7, 2022
@Alvin1Zhang
Copy link
Collaborator

Thanks for sharing the updates, fix on master branch is available at 2e3c72a. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

5 participants