CanvasWidgetRenderer setup buffer
I read the 4.10.0 User Manual on CanvasWidgetRenderer.
I was unsure what it means by "CanvasWidget will not allocate memory dynamically, but will use memory from the buffer kept in CanvasWidget -Renderer."
I see the commented line in main.cpp:
//static uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
//CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);When I create screens with lineprogressbar the generated files all have :
static const uint16_t CANVAS_BUFFER_SIZE = 4800;
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);Is it better to have one function (CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);) called in main.cpp or have multiple screen call (CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);) ?
The application is running fine with multiple calls, but I was just afraid this will create memory problem if the buffer isn't returned during teardown.
Thanks for the help!