Use encoder to change lv_bar value when bar is focused
What MCU/Processor/Board and compiler are you using?
custom STM32F407
What LVGL version are you using?
Last from git
What do you want to achieve?
Change lv_bar value using encoder knob, when rotate left decrease value, right increase it
for example: Click bar -> bar keeps focus, and change its value on encoder rotation-> click to release
@techtoys
Thanks for reply,
but i have different problem. I want to change lv_bar value on encoder movement. I will try to explain my idea. I have bar and button i want when i click on button, i want to change bar value using encoder movement.
I cant figure out, how to do it
lv_refr_now its not required, i do not see it in docs, but i use this routine to refresh screen after encoder movement. In my case lv_task_handler can be blocked in certain circumstances.
You need to select the lv_bar object to get into edit mode, then you move the encoder and it will change the value. Once you’re happy with the.value you d a long press of the encoder and it will exit the edit mode.
I don’t think you should be calling lv_refr_now in your read function. I recommend ensuring that lv_task_handler doesn’t block and leaving it to LVGL to manage screen refreshing.