Description
The TFT Simulator crashes when I enter a callback function making changes to a button matrix (when I click a button which has the below detailed callback function.
What MCU/Processor/Board and compiler are you using?
PC Simulator, LVGL lib actual master
What do you want to achieve?
To make the button matrix inactive in case of a toggled button.
What have you tried so far?
See the code below.
Code to reproduce
Callback called when a button is clicked. In case button is toggled, the btnmFeederMove
button matrix shall be set to inactive. is defined as:
static lv_obj_t * btnmFeederMove;
The callback function looks like:
static void callBack_btnAutoManual(lv_obj_t * btn, lv_event_t event)
{
lv_btn_state_t stateBtnAutoManual;
if(event == LV_EVENT_CLICKED) {
stateBtnAutoManual = lv_btn_get_state(btn);
switch(stateBtnAutoManual)
{
case LV_BTN_STATE_TGL_REL:
lv_label_set_text(lblBtnAutoManualMode,"MANUAL");
lv_btnm_clear_btn_ctrl_all(btnmFeederMove,LV_BTNM_CTRL_INACTIVE);
break;
default:
break;
}
}
}
Screenshot and/or video
Standard .exe crash screen.