SLS export - slider

When I export code from SLS and there is use of function _ui_slider_increment, this function is missing last parameter and semicolon at the end.

Esported code in ui.c:

static void ui_event_Image3(lv_event_t * e)
{
    lv_event_code_t event = lv_event_get_code(e);
    lv_obj_t * ta = lv_event_get_target(e);
    if(event == LV_EVENT_CLICKED) {
        _ui_slider_increment(ui_Slider1, 100, LV_ANIM_ON)
    }
}

Code with changes to make it work in ui.c:

static void ui_event_Image3(lv_event_t * e)
{
    lv_event_code_t event = lv_event_get_code(e);
    lv_obj_t * ta = lv_event_get_target(e);
    if(event == LV_EVENT_CLICKED) {
        _ui_slider_increment(ui_Slider1, 100, LV_ANIM_ON, 0);
    }
}

A looked at declaration of this function in ui_helpers.h and there are all parameters:

void _ui_slider_increment(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay);

Others

  • SquareLine Studio version: 1.0.5
  • Operating system: Windows 10 x64
  • Target hardware: ESP32

It’s really exported incorrectly. Thanks for reporting it. We added it to our TODO list for the next release.

1 Like