M2_STRLIST, ok the msg parameter and operation.
But he is in between of other elements, and I can not move to the next or previous item.
In COMBO would be interesting to know if the value of combo has changed by a msg in cb function.
setRootChangeCallback , i think not server:
m2_menu_entry m2_2lmenu_data[] =
{
{ "Menu 1", NULL },
{ "Menu 2", NULL },
{ "Execute", &top_el_dummy },
{ NULL, NULL },
};
void dummy_fn(m2_el_fnarg_p fnarg)
{
arr = (TimeAlarmsClass *) malloc(sizeof(TimeAlarmsClass) * 10);
for(int i = 0; i < 10; i++)
Serial.println(arr[i].getTriggeredAlarmId());
digitalWrite(RL1,ON);
delay (1000);
digitalWrite(RL1,OFF);
m2.setRoot(&m2_null_element);
}
M2_BUTTON(top_el_dummy,NULL,"CONFIRMAR",dummy_fn);
From a menu item. I want to execute a function
It is made with a button but I do not want to use the button.
I need an item that does not show anything and know that the menu item was who called
Thanks very much by the interest
Best Regards