Skip to main content
GS1
Senior III
October 15, 2019
Solved

Integration of Repository Widget Examples "Gauge" and "Graph" not working

  • October 15, 2019
  • 3 replies
  • 1034 views

Hello all,

I tried to integrate the Gauge and Graph examples (from the repository) into my project, but both (separately tried) result in a lock up of the system as soon as the components are generated in the view class.

I took care to include the call for "setupBuffer "at the end of touchgfx_init and included the following lines:

   #define CANVAS_BUFFER_SIZE (3600*3)

   static uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];

   CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);

I copied the code from the template view into my own screen view class without further modification.

When I debug the code in the embedded system, the system hangs as soon as I enter the view. The call stack shows that it sticks in PainterRGB565::PainterRGB565 (color 0x00, alpha 0xFF).

Any ideas what could be the reason?

This topic has been closed for replies.
Best answer by Martin KJELDSEN

The reason could be that you're using a painter (RGB565) for an LCD driver that doesn't support it (e.g LCD24bpp). You're probably stuck in an assert. If you've copied some of the code for your application then you may have "forgotten" (Not that it's obvious) to change the painter to PainterRGB888 since your application is running in 24bpp mode.

/Martin

3 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
October 15, 2019

The reason could be that you're using a painter (RGB565) for an LCD driver that doesn't support it (e.g LCD24bpp). You're probably stuck in an assert. If you've copied some of the code for your application then you may have "forgotten" (Not that it's obvious) to change the painter to PainterRGB888 since your application is running in 24bpp mode.

/Martin

GS1
GS1Author
Senior III
October 15, 2019

:see_no_evil_monkey: thank you, Martin! Problem solved!

I wasn't aware of this necessary change... Have a great day!

Martin KJELDSEN
Principal III
October 15, 2019

Sweet! No problem. Have a great day too :)

/Martin