‎2019-10-15 01:58 AM
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?
Solved! Go to Solution.
‎2019-10-15 05:00 AM
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
‎2019-10-15 05:00 AM
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
‎2019-10-15 05:17 AM
:see_no_evil_monkey: thank you, Martin! Problem solved!
I wasn't aware of this necessary change... Have a great day!
‎2019-10-15 05:55 AM
Sweet! No problem. Have a great day too :)
/Martin