Error in generated ui.c file for switch event

What do you want to achieve?

switch event that calls a particular function in this case “tmpAlertOn” and “tmpAlertOff”…

What have you tried so far?

Generate Files operation in SLS 1.1.0 beta 1

Screenshot or video

This is the code that gets generated for the “ui_swTempAlert” switch object:
it should have “swTempAlert” rather than “target_obj” after changing it will compile correctly.

void ui_event_swTempAlert(lv_event_t * e)

{

lv_event_code_t event_code = lv_event_get_code(e);

lv_obj_t * target = lv_event_get_target(e);

if(event_code == LV_EVENT_VALUE_CHANGED &&  lv_obj_has_state(target_obj, LV_STATE_CHECKED)) {

    tmpAlertOn(e);

}

if(event_code == LV_EVENT_VALUE_CHANGED &&  !lv_obj_has_state(target_obj, LV_STATE_CHECKED)) {

    tmpAlertOff(e);

}

}

Others

  • SquareLine Studio version:

1.1.0 beta 1

  • Operating system:
    Winbloze 10
  • Target hardware:
    ESP32 (M5stack Core2)

Thanks for the report. It’s already fixed internally and fix will be available in v1.1.

Excellent!! Thanks so very much!!