cancel
Showing results for 
Search instead for 
Did you mean: 

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

GS1
Senior III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

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

View solution in original post

3 REPLIES 3
Martin KJELDSEN
Chief III

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
Senior III

:see_no_evil_monkey: thank you, Martin! Problem solved!

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

Martin KJELDSEN
Chief III

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

/Martin