Invalid conversion from 'void*' to 'lv_meter_indicator_t*' [-fpermissive]

Hello, for some meter examples, the function see below is needed. But with this function the compiler says always something is wrong with “void / indic” … what is not correct?! Is there a problem with “void”?
See error:

src\main.cpp:164:45: error: invalid conversion from ‘void*’ to ‘lv_meter_indicator_t*’ [-fpermissive]

static void set_value( void* indic, int32_t v)
{
    lv_meter_set_indicator_end_value(meter, indic, v);
}

Thank you

1 Like

Hi,

I am having this same problem right now.

Did you find a solution?

I just started using Ardriuno on Platformio and I also encountered this problem. Is there a solution?

I don’t know exactly how I resolved it, but based on my code I see, I now call the function directly without using this “set_value” function…

I am not sure why it works, but it seems i’ve solved this by adding a force type convertor in front of it:

static void set_value(void * indic, int32_t v)
{
lv_meter_set_indicator_end_value(meter, (lv_meter_indicator_t *) indic, v);
}

now it works quite well in my Arduino LUATOS.COM/T/ESP32C3

1 Like