Bug in Button ink out time


Ink Out effect time is not getting set correctly.

What MCU/Processor/Board and compiler are you using?


What do you experience?

So, I am writing unit tests in my serialization and ink out time is not being set.

What do you expect?

Ink out time being set correctly.

Code to reproduce

Bug is here, line 340 in lv_btn.c:

uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn)
    lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
    return ext->ink_in_time;                            <<<<<<< ERROR
    (void)btn; /*Unused*/
    return 0;

ink_in_time is being returned when it should be ink in

Use the ```c and ``` tags to format your code:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current issue.

Thanks, I fixed it here.

Gracias. I suppose its one good side effect of my gui project. Since I am also writing serialization, I am ending up writing unit tests the essentially test nearly all LVGL properties.

That’s awesome! :slight_smile:

There is another topic about unit tests. Maybe there are some common points.

Oh, I am sure. When I get this all done, maybe we can add it as a checkin gate (The unit tests).