Best way to save value when slider is used

Hello,

I have application in which slider is used in order to set particular value. I need to save this value in ini configuration file. But when it is best way to save value? Looks like slider event callback is not the best place to save events since they appear too often.

Why not? As far as I understand LV_EVENT_RELEASED will be called when you release slider. So save data when slider released.
Besides documentation tells

  • LV_EVENT_VALUE_CHANGED Sent while the slider is being dragged or changed with keys. The event is sent continuously while the slider is dragged and once when released. Use lv_slider_is_dragged to determine whether the Slider is still being dragged or has just been released.

In this case lv_slider_is_dragged() should return false in LV_EVENT_VALUE_CHANGED-handler if slider released, in this moment you can save data.