Description
I declare chart series globally:
lv_chart_series_t * ser0;
lv_chart_series_t * ser1;
then I make an array with these (also in global declaration).
lv_chart_series_t * allSeries[] = {ser0,ser1};
So if I get it right, allSeries is now a pointer to an array of pointers to data series.
I add the series to the chart when initializing it.
chart=lv_chart_create(scrTrend);
ser0 = lv_chart_add_series(chart, lv_palette_main(ser0Color), LV_CHART_AXIS_PRIMARY_Y);
When I want to pass them, the code compiles, but nothing happens…
lv_chart_set_next_value(chart, (lv_chart_series_t *) allSeries[0], value));
if i replace “(lv_chart_series_t *) allSeries[0]” with “ser0”, it works. What is the difference between the 2?
What MCU/Processor/Board and compiler are you using?
ESP32/CYD, VScode/Platformio/Arduino
What LVGL version are you using?
9.1
What do you want to achieve?
Pass a lv_chart_series_t* from an array to lv_chart_set_next_value()
What have you tried so far?
every syntax for casting I could come up with