What do you want to achieve?
I have a small project created in SquareLine Studio for Arduino GIGA display R1 board.
in the square line studio, I have 1 roller (name = EcuSelection)
I want to achieve that if I scroll the roller from the screen I shall get selected index in the event handler.
What have you tried so far?
event added as,
lv_obj_add_event_cb(ui_EcuSelection, EcuSelection_event_handler, LV_EVENT_SCROLL, NULL);
static void EcuSelection_event_handler(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
lv_obj_t * obj = lv_event_get_target(e);
if(code == LV_EVENT_VALUE_CHANGED) {
uint32_t get_selected = lv_roller_get_selected(obj);
Serial.print (“EcuSelection = 0x”) ;
Serial.println (get_selected) ;
}
}
As soon as I compile the sketch and upload into the Arduino board, scroller and touch screen works fine but after rolling a roller the event handler do not call automatically and hence I can’t get roller index.
for example, if I do same thing for button, then complete interface works fine.
need help to make roller working to get its index.
Screenshot or video
Others
-
SquareLine Studio version:
1.4.1 -
Operating system:
MAC Os Sonoma version 14.5 -
Target hardware:
MAC book Air