Error: too few arguments to function '_ui_spinbox_step'

in ui_helpers the spin box stepper is defined as needing some animation int value void _ui_spinbox_step( lv_obj_t *target, int val, int anm)

However, when called in ui.c it only has two arguments _ui_spinbox_step( ui_AlarmSpinBox, -1);

What am I missing here? Both files are dynamically generated by squareline. do I need to assign an animation in SLS somehow?

Update on what I’ve tried:
The _ui_spinbox_step is called when the increment or decrement buttons are pressed. So I tried to add an animation to the LV_EVENT_CLICKED event on the Button event.

void ui_event_AlarmStepperMinusButton( 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_CLICKED) {
      _ui_spinbox_step( ui_AlarmSpinBox, -1);
      SpinBox_Animation(ui_AlarmSpinBox, 0);

As you can see it still only added two arguments to _ui_spinbox_step.

Also if I manually code in a 1 or 0 into the function calls in the ui.c file it will compile but when I press the increment button the program crashes. sooo… that’s where I’m at.

Okay my guess is this is a bug.

Here is the full code autogenerated for the spinbox step:

void _ui_spinbox_step( lv_obj_t *target, int val, int anm) 
   int old = lv_slider_get_value(target);
   lv_slider_set_value(target, old+val, anm);
   lv_event_send(target,LV_EVENT_VALUE_CHANGED, 0);

I’m not sure why it’s calling infromation related to a slider.

According to LVGL docs it should be as simple as a single call for increment or decrement:

lv_spinbox_increment(spinbox) and lv_spinbox_decrement(spinbox) increments/decrements the value of the Spinbox according to the currently selected digit.

So what I’ve done to solve this is to not rely on the SLS “STEP SPINBOX” event and now I just have my plus and minus buttons call functions for increment and decrement.

void AlarmSetPlusBtnCB(lv_event_t *e)

Not ideal but it’s what needs to be done.

I just tried your example (2 buttons to increment/decrement a spinbox) in the newly released SquareLine Studio 1.4.0. The export seems fine so far, and works. The events are actually calling a _ui_spinbox_step() function in ui_helpers.c which in turn calls the above_mentioned lv_spinbox_increment or lv_spinbox_decrement based on the passed value (positive vs negative, 1 and -1 in the export) and also sends an LV_EVENT_VALUE_CHANGED event for the spinbox.