Jomelo/LCDMenuLib2

REG_control not initialized

Closed this issue · 1 comments

_class LCDMenuLib2_menu
{
      uint8_t REG_control;     // control register
      [...]
 }


 LCDMenuLib2_menu::LCDMenuLib2_menu(uint8_t p_id, uint8_t p_param, uint8_t p_configuration, LCDML_FuncPtr_pu8 
 p_callback_function, LCDML_FuncPtr_rb p_callback_condition)
{
switch(p_configuration)
{
    case _LCDML_TYPE_default:  bitSet(REG_control, _LCDML_REG_MENU_CONTROL_type_default);   break;
    case _LCDML_TYPE_dynParam: bitSet(REG_control, _LCDML_REG_MENU_CONTROL_type_dynParam);  break;
    default:
        break;
}_ 

The following variable needs to be intialized: REG_control = 0;
Current behaviour: It is sometimes not possible to step into a child menu element, because the bit "_LCDML_REG_MENU_CONTROL_type_dynParam" is set randomly.

Hey,
i fix this bug with the next version.
Best Regards,