How to display alarm records?

Hi, my device requires a screen display of alarm records, and the recorded data is stored in FLASH. Which widget should I use to implement it, preferably simple and convenient.Flipping or scrolling?

For example:

    lv_obj_t * table = lv_table_create(lv_scr_act());

	int element_index = 0;

    lv_table_set_cell_value(table, element_index, 0, "Name");
    lv_table_set_cell_value(table, element_index, 1, "Lat_Accel");
	lv_table_set_cell_value(table, element_index, 2, "Yav");
	lv_table_set_cell_value(table, element_index, 3, "ABS_Error_Code");
	lv_obj_set_height(table, 200);

If a new event occurs, then increase the element_index.

    lv_table_set_cell_value_fmt(table, element_index, 0, "Date %d", element_index + 1);
    lv_table_set_cell_value_fmt(table, element_index, 1, "Item %d", element_index + 1);
	lv_table_set_cell_value_fmt(table, element_index, 2, "Item %d", element_index + 1);
	lv_table_set_cell_value_fmt(table, element_index, 3, "Item %d", element_index + 1);

Something like that.

Can it be dynamically added or deleted?

Hi @gui_lvgl ,

There is an example implementation here

Kind Regards,


1 Like

That’s great for real-time alarm display. If I have 1000 historical alarm records and the current page displays a maximum of 10 at a time, which method would be better for flipping or scrolling?

Hi @gui_lvgl ,

I realise the example is not exactly to your needs but it demonstrates quite a lot of features of the table widget and how it works…

There is no off the shelf way to do what you are asking so you will need to implement the logic yourself to say load 10 entries into the table have a next/previous page button(this is easier than scrolling) and keep track of where in the flash you are etc.

If you have a go at implementing it and get stuck you can post on here and the community will help you solve any issues… :slight_smile:

Kind Regards,


Thank you pete,I think you have already provided the answer!