cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong Color on device if set with getColorFromRGB but correct on simualtor after upgrading both, touchgfx to 4.18 and stm32f4 firmware from 1.26.1 to 1.26.2

awiernie
Senior II

If I set the color of a box widget with setColor and the touchgfx::colortype is 0xFF494949, the color on the LCD is blue but not grey. This problem happens after the updates.

The color value is produced by Color::getColorFromRGB() from the 3 base colors set to 0x49.

As I understand from the description of getColorFromRGB, it should return a display specific value for the color?

I have read that there was a change in the color functions. How can I correct set the color from the 3 RGB-Values (0..255)?

1 ACCEPTED SOLUTION

Accepted Solutions
awiernie
Senior II

 device configuration tool code generation solved the problem.

View solution in original post

2 REPLIES 2
awiernie
Senior II

I have found this on Known Issues | TouchGFX Documentation:

LCD16bpp::fillRect and LCD16bpp::drawGlyph#

The fillRect and drawGlyph functions in LCD16bpp now pass the full 24bit color to the DMA, instead of the reduced 16bit (RGB565) color. This may result in wrong colors on the hardware (not the simulator) and can be fixed by regenerating the DMA classes from CubeMX.

In my case, it happens however only in a custom widget where I set the color this way. On other places, where the color comes from touchgfx settings everything is OK.

I guess that the device configuration tool code generation will generate the classes. I will try this later.

awiernie
Senior II

 device configuration tool code generation solved the problem.