Skip to content

Commit

Permalink
v2.2.7 beta-4
Browse files Browse the repository at this point in the history
- BugFix: Enter dynamic functions
- BugFix: open menu elements with no content
  • Loading branch information
Jomelo committed Mar 22, 2021
1 parent 2479264 commit b252cfc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=LCDMenuLib2
version=2.2.7 beta-3
version=2.2.7 beta-4
author=Nils Feldkaemper <[email protected]>
maintainer=Nils Feldkaemper <[email protected]>
sentence=Easy creation of a multi layer tree menu with screensaver and other stuff.
Expand Down
20 changes: 12 additions & 8 deletions src/LCDMenuLib2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,24 +1053,25 @@ void LCDMenuLib2::MENU_goInto(void)
if (actMenu_id == _LCDML_NO_FUNC)
{
// check if element is a menu function
if(curMenu->getChild(cursor_obj_pos)->getChild(0) == NULL
&& curMenu->getChild(cursor_obj_pos)->checkType_menu() == true)
if(curMenu->getChild(cursor_obj_pos)->getChild(0) == NULL // no children
&& curMenu->getChild(cursor_obj_pos)->checkType_menu() == true // menu element
&& curMenu->getChild(cursor_obj_pos)->getCbFunction() != LCDML_cb_default_function) // default call back function
{
// Menu function found
actMenu_cb_function = curMenu->getChild(cursor_obj_pos)->getCbFunction();
actMenu_id = curMenu->getChild(cursor_obj_pos)->getID();
actMenu_param = curMenu->getChild(cursor_obj_pos)->getParam();
actMenu_param = curMenu->getChild(cursor_obj_pos)->getParam();
}
else
{
if(curMenu->getChild(cursor_obj_pos)->checkType_dynParam() == true
&& curMenu->getChild(cursor_obj_pos)->checkType_dynParam_enabledSubMenu() == false
&& bitRead(REG_control, _LCDML_REG_control_en_use_dyn_elements_as_menu) == false)
if(curMenu->getChild(cursor_obj_pos)->checkType_dynParam() == true // dynamic menu element
&& curMenu->getChild(cursor_obj_pos)->checkType_dynParam_enabledSubMenu() == false // submenus disabled
&& bitRead(REG_control, _LCDML_REG_control_en_use_dyn_elements_as_menu) == false) // dyn sub menus general disabled
{
DISP_update();
}
else
{
{
if(curMenu->getChild(cursor_obj_pos)->getChild(0) != NULL)
{
//check if element has visible children
Expand Down Expand Up @@ -1099,7 +1100,10 @@ void LCDMenuLib2::MENU_goInto(void)
}
else
{
// do nothing
if(curMenu->getChild(cursor_obj_pos)->checkType_dynParam() == true)
{
DISP_update();
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/LCDMenuLib2.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
#endif

// Version
#define _LCDML_VERSION "LCDML2 v2.2.7 beta-3"
#define _LCDML_VERSION "LCDML2 v2.2.7 beta-4"

// this makro is for unused variables which exists for compatibility things ...
#define LCDML_UNUSED(expr) do { (void)(expr); } while (0)
Expand Down

0 comments on commit b252cfc

Please sign in to comment.