Skip to content

Commit 59257c2

Browse files
committed
v2.2.7
- update example
1 parent 72f530d commit 59257c2

File tree

52 files changed

+50
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+50
-100
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) [2021] [Jomelo]
3+
Copyright (c) [2021] [Nils Feldkämper]
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Images:
5454

5555
MIT License
5656

57-
Copyright (c) [2021] [Jomelo]
57+
Copyright (c) [2021] [Nils Feldkämper]
5858

5959
Permission is hereby granted, free of charge, to any person obtaining a copy
6060
of this software and associated documentation files (the "Software"), to deal

examples/00_beginners/LCDML_000_serialMonitor/LCDML_000_serialMonitor.ino

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@
4444
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
4545
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows-_LCDML_DSIP_use_header, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);
4646

47-
// *********************************************************************
48-
// LCDML MENU/DISP
49-
// *********************************************************************
50-
// LCDML_0 => layer 0
51-
// LCDML_0_X => layer 1
52-
// LCDML_0_X_X => layer 2
53-
// LCDML_0_X_X_X => layer 3
54-
// LCDML_0_... => layer ...
55-
5647
// *********************************************************************
5748
// LCDML MENU/DISP
5849
// *********************************************************************
@@ -85,7 +76,7 @@
8576
// Example for one function and different parameters
8677
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
8778
// the parameter change can also be released with dynParams on the next example
88-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
79+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
8980
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
9081
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
9182
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
@@ -97,13 +88,13 @@
9788
// 1. set the string to ""
9889
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
9990
// this function type can not be used in combination with different parameters
100-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
91+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
10192
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function
10293

10394
// Example for conditions (for example for a screensaver)
10495
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
10596
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
106-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
97+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
10798
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
10899

109100
// Example function for event handling (only serial output in this example)

examples/00_beginners/LCDML_001_liquidCrystal/LCDML_001_liquidCrystal.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
// Example for one function and different parameters
9999
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
100100
// the parameter change can also be released with dynParams on the next example
101-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
101+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
102102
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
103103
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
104104
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
@@ -110,13 +110,13 @@
110110
// 1. set the string to ""
111111
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
112112
// this function type can not be used in combination with different parameters
113-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
113+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
114114
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function
115115

116116
// Example for conditions (for example for a screensaver)
117117
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
118118
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
119-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
119+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
120120
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
121121

122122
// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.

examples/01_backend/LCDML_010_simpleThread/LCDML_010_simpleThread.ino

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@
5353
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
5454
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);
5555

56-
// *********************************************************************
57-
// LCDML MENU/DISP
58-
// *********************************************************************
59-
// LCDML_0 => layer 0
60-
// LCDML_0_X => layer 1
61-
// LCDML_0_X_X => layer 2
62-
// LCDML_0_X_X_X => layer 3
63-
// LCDML_0_... => layer ...
64-
6556
// *********************************************************************
6657
// LCDML MENU/DISP
6758
// *********************************************************************
@@ -94,7 +85,7 @@
9485
// Example for one function and different parameters
9586
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
9687
// the parameter change can also be released with dynParams on the next example
97-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
88+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
9889
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
9990
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
10091
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
@@ -106,13 +97,13 @@
10697
// 1. set the string to ""
10798
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
10899
// this function type can not be used in combination with different parameters
109-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
100+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
110101
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function
111102

112103
// Example for conditions (for example for a screensaver)
113104
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
114105
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
115-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
106+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
116107
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
117108

118109
// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.

examples/01_backend/LCDML_011_TaskScheduler/LCDML_011_TaskScheduler.ino

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@
4848
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
4949
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);
5050

51-
// *********************************************************************
52-
// LCDML MENU/DISP
53-
// *********************************************************************
54-
// LCDML_0 => layer 0
55-
// LCDML_0_X => layer 1
56-
// LCDML_0_X_X => layer 2
57-
// LCDML_0_X_X_X => layer 3
58-
// LCDML_0_... => layer ...
59-
6051
// *********************************************************************
6152
// LCDML MENU/DISP
6253
// *********************************************************************
@@ -89,7 +80,7 @@
8980
// Example for one function and different parameters
9081
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
9182
// the parameter change can also be released with dynParams on the next example
92-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
83+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
9384
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
9485
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
9586
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
@@ -101,13 +92,13 @@
10192
// 1. set the string to ""
10293
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
10394
// this function type can not be used in combination with different parameters
104-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
95+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
10596
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function
10697

10798
// Example for conditions (for example for a screensaver)
10899
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
109100
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
110-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
101+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
111102
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
112103

113104
// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.

examples/02_functionality/LCDML_020_filelist/LCDML_020_filelist.ino

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@
4343
LCDMenuLib2_menu LCDML_0 (255, 0, 0, NULL, NULL); // root menu element (do not change)
4444
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);
4545

46-
// *********************************************************************
47-
// LCDML MENU/DISP
48-
// *********************************************************************
49-
// LCDML_0 => layer 0
50-
// LCDML_0_X => layer 1
51-
// LCDML_0_X_X => layer 2
52-
// LCDML_0_X_X_X => layer 3
53-
// LCDML_0_... => layer ...
54-
5546
// *********************************************************************
5647
// LCDML MENU/DISP
5748
// *********************************************************************
@@ -84,7 +75,7 @@
8475
// Example for one function and different parameters
8576
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
8677
// the parameter change can also be released with dynParams on the next example
87-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
78+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
8879
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
8980
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
9081
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
@@ -96,13 +87,13 @@
9687
// 1. set the string to ""
9788
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
9889
// this function type can not be used in combination with different parameters
99-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
90+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
10091
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function
10192

10293
// Example for conditions (for example for a screensaver)
10394
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
10495
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
105-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
96+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
10697
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
10798

10899
// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.

examples/02_functionality/LCDML_021_dynUpdatedContent/LCDML_021_dynUpdatedContent.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
// Example for one function and different parameters
8989
// It is recommend to use parameters for switching settings like, (small drink, medium drink, big drink) or (200ml, 400ml, 600ml, 800ml) ...
9090
// the parameter change can also be released with dynParams on the next example
91-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
91+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
9292
LCDML_addAdvanced (16 , LCDML_0 , 5 , NULL, "Parameter" , NULL, 0, _LCDML_TYPE_default); // NULL = no menu function
9393
LCDML_addAdvanced (17 , LCDML_0_5 , 1 , NULL, "Parameter 1" , mFunc_para, 10, _LCDML_TYPE_default); // NULL = no menu function
9494
LCDML_addAdvanced (18 , LCDML_0_5 , 2 , NULL, "Parameter 2" , mFunc_para, 20, _LCDML_TYPE_default); // NULL = no menu function
@@ -100,7 +100,7 @@
100100
// 1. set the string to ""
101101
// 2. use type _LCDML_TYPE_dynParam instead of _LCDML_TYPE_default
102102
// this function type can not be used in combination with different parameters
103-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
103+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
104104
LCDML_addAdvanced (21 , LCDML_0 , 6 , NULL, "" , mDyn_para, 0, _LCDML_TYPE_dynParam); // NULL = no menu function
105105

106106
// 2. Example for dyn content
@@ -113,7 +113,7 @@
113113
// Example for conditions (for example for a screensaver)
114114
// 1. define a condition as a function of a boolean type -> return false = not displayed, return true = displayed
115115
// 2. set the function name as callback (remove the braces '()' it gives bad errors)
116-
// LCDMenuLib_add(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
116+
// LCDMenuLib_addAdvanced(id, prev_layer, new_num, condition, lang_char_array, callback_function, parameter (0-255), menu function type )
117117
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
118118

119119
// ***TIP*** Try to update _LCDML_DISP_cnt when you add a menu element.

0 commit comments

Comments
 (0)