Skip to content

Commit

Permalink
v2.2.7
Browse files Browse the repository at this point in the history
- update example
  • Loading branch information
Jomelo committed May 25, 2021
1 parent 72f530d commit 59257c2
Show file tree
Hide file tree
Showing 52 changed files with 50 additions and 100 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) [2021] [Jomelo]
Copyright (c) [2021] [Nils Feldkämper]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Images:

MIT License

Copyright (c) [2021] [Jomelo]
Copyright (c) [2021] [Nils Feldkämper]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows-_LCDML_DSIP_use_header, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
// LCDML_0 => layer 0
// LCDML_0_X => layer 1
// LCDML_0_X_X => layer 2
// LCDML_0_X_X_X => layer 3
// LCDML_0_... => layer ...

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
Expand Down Expand Up @@ -85,7 +76,7 @@
// Example for one function and different parameters
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
// the parameter change can also be released with dynParams on the next example
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
Expand All @@ -97,13 +88,13 @@
// 1. set the string to ""
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
// this function type can not be used in combination with different parameters
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function

// Example for conditions (for example for a screensaver)
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (22 , LCDML_0 , 7 , COND_hide, "screensaver" , mFunc_screensaver, 0, _LCDML_TYPE_default); // this menu function can be found on "LCDML_display_menuFunction" tab

// Example function for event handling (only serial output in this example)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
// Example for one function and different parameters
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
// the parameter change can also be released with dynParams on the next example
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
Expand All @@ -110,13 +110,13 @@
// 1. set the string to ""
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
// this function type can not be used in combination with different parameters
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function

// Example for conditions (for example for a screensaver)
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (22 , LCDML_0 , 7 , COND_hide, "screensaver" , mFunc_screensaver, 0, _LCDML_TYPE_default); // this menu function can be found on "LCDML_display_menuFunction" tab

// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
// LCDML_0 => layer 0
// LCDML_0_X => layer 1
// LCDML_0_X_X => layer 2
// LCDML_0_X_X_X => layer 3
// LCDML_0_... => layer ...

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
Expand Down Expand Up @@ -94,7 +85,7 @@
// Example for one function and different parameters
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
// the parameter change can also be released with dynParams on the next example
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
Expand All @@ -106,13 +97,13 @@
// 1. set the string to ""
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
// this function type can not be used in combination with different parameters
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function

// Example for conditions (for example for a screensaver)
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (22 , LCDML_0 , 7 , COND_hide, "screensaver" , mFunc_screensaver, 0, _LCDML_TYPE_default); // this menu function can be found on "LCDML_display_menuFunction" tab

// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
// LCDML_0 => layer 0
// LCDML_0_X => layer 1
// LCDML_0_X_X => layer 2
// LCDML_0_X_X_X => layer 3
// LCDML_0_... => layer ...

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
Expand Down Expand Up @@ -89,7 +80,7 @@
// Example for one function and different parameters
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
// the parameter change can also be released with dynParams on the next example
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
Expand All @@ -101,13 +92,13 @@
// 1. set the string to ""
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
// this function type can not be used in combination with different parameters
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function

// Example for conditions (for example for a screensaver)
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (22 , LCDML_0 , 7 , COND_hide, "screensaver" , mFunc_screensaver, 0, _LCDML_TYPE_default); // this menu function can be found on "LCDML_display_menuFunction" tab

// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
// LCDML_0 => layer 0
// LCDML_0_X => layer 1
// LCDML_0_X_X => layer 2
// LCDML_0_X_X_X => layer 3
// LCDML_0_... => layer ...

// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
Expand Down Expand Up @@ -84,7 +75,7 @@
// Example for one function and different parameters
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
// the parameter change can also be released with dynParams on the next example
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
Expand All @@ -96,13 +87,13 @@
// 1. set the string to ""
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
// this function type can not be used in combination with different parameters
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function

// Example for conditions (for example for a screensaver)
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (22 , LCDML_0 , 7 , COND_hide, "screensaver" , mFunc_screensaver, 0, _LCDML_TYPE_default); // this menu function can be found on "LCDML_display_menuFunction" tab

// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
// Example for one function and different parameters
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
// the parameter change can also be released with dynParams on the next example
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
Expand All @@ -100,7 +100,7 @@
// 1. set the string to ""
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
// this function type can not be used in combination with different parameters
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function

// 2. Example for dyn content
Expand All @@ -113,7 +113,7 @@
// Example for conditions (for example for a screensaver)
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
LCDML_addAdvanced (23 , LCDML_0 , 8 , COND_hide, "screensaver" , mFunc_screensaver, 0, _LCDML_TYPE_default); // this menu function can be found on "LCDML_display_menuFunction" tab

// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.
Expand Down
Loading

0 comments on commit 59257c2

Please sign in to comment.