I’m trying with the same code both on the simulator for windows and on my board. I would like to get two graphs on two different lines. On the simulator everything is OK, While on my custom board it doesn’t work.
Obviously I have already tested writing/displaying static things on the screen and it works perfectly
What is the parent object size? It almost seems that the parent object size was small (height), and the flex layout is adjusting the size/height of the charts…
Considering the top of screen in the image/Display you shown, it also seems that there is some issue in the flush_cb function, the top part seems to be garbled.
Just asking, that it seems you are setting a single buffer, and indicating that the size is 800x480x2, but with render mode set to Partial.
You are using a single framebuffer, with total screen size but in partial mode, depending on how you have your fluch_cb that could be the issue. Maybe you intended to use LV_DISP_RENDER_MODE_FULL?
Tried you code in my current development board/software, and it just works (still using 9.2.2).
I entered LV_DISP_RENDER_MODE_FULL
and indeed the series is inside the chart now.
however I see the monitor refresh rate is too high (I don’t know if I explained myself) the framebuffer is a pointer to my external SDRAM while the flush is that of the template
static void disp_flush(lv_display_t * disp_drv, const lv_area_t * area, uint8_t * px_map)
{
if(disp_flush_enabled) {
/*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
int32_t x;
int32_t y;
for(y = area->y1; y <= area->y2; y++) {
for(x = area->x1; x <= area->x2; x++) {
/*Put a pixel to the display. For example:*/
/*put_px(x, y, *px_map)*/
px_map++;
}
}
}
/*IMPORTANT!!!
*Inform the graphics library that you are ready with the flushing*/
lv_display_flush_ready(disp_drv);
}
Setting the flush this way, the problem seems to be solved. can i add other improvements? it’s the first time i use lvgl and i’m discovering everything