Description
I would like to add userdata to the event. However, the user data is always transmitted incorrectly.
What MCU/Processor/Board and compiler are you using?
Arduino Due / Arduino IDE
What LVGL version are you using?
V8.0
What do you want to achieve?
The user data correctly transferred to the event callback function
What have you tried so far?
I tried to transfer user data via LVGL functions. When reading out the data does not match the original data that I sent. I send an Integer like 10001 but when i print the receive userdata it is something like 5344554.
Code to reproduce
The code block(s) should be formatted like:
int tmp_numpad_userdata;
tmp_numpad_userdata = channel * 10000 + current_frame * 100 + current_signal;
lv_obj_add_event_cb(labelReihe1[current_signal + output_config_send_data_offset][1], my_event_cb_NUM_Pad, LV_EVENT_CLICKED, &tmp_numpad_userdata);
// and the cb function
static void my_event_cb_NUM_Pad(lv_event_t * e)
{
int * userdata = (int *)lv_event_get_user_data(e);
//int userdata2 = int(*userdata)
//int *pInt = static_cast<int*>(lv_event_get_user_data(e));
log_newline();
log_item("Übergabeparameter ist ");
log_item(* userdata);
log_newline();
}