@@ -20,7 +20,7 @@ Works either over serial or with LCD + encoder
2020- Customizable (colors and cursors).
2121- Able to work over Serial stream for regular or debug mode.
2222
23- [ ![ IMAGE ALT TEXT] ( https://img.youtube.com/vi/wHv5sU-HXVI/2.jpg )] ( https://youtu.be/wHv5sU-HXVI " Arduino menu 2.0 video ") [ ![ IMAGE ALT TEXT] ( https://img.youtube.com/vi/W-TRCziF67g/2.jpg )] ( https://youtu.be/W-TRCziF67g " Arduino menu basic features video ")
23+ [ ![ IMAGE ALT TEXT] ( https://img.youtube.com/vi/wHv5sU-HXVI/2.jpg )] ( https://youtu.be/wHv5sU-HXVI " Arduino menu 2.0 fields video ") [ ![ IMAGE ALT TEXT] ( https://img.youtube.com/vi/W-TRCziF67g/2.jpg )] ( https://youtu.be/W-TRCziF67g " Arduino menu basic features video ")
2424
2525## IO devices
2626### Output devices
@@ -104,97 +104,146 @@ MENU(mainMenu,"Main menu",
104104
105105## syntax
106106
107- OP(name,function)
108- name string to be shown as menu option prompt
109- function to be called on click
110-
111- FIELD(variable,name,units,min,max,step,tune,function)
112- Holding and changing numeric values
113- where:
114- variable: holding the value (must be numeric or support comparison oprators)
115- name: to use as prompt
116- units: to be shown after value
117- min,max: defining numeric value range
118- step: increment/decrement when adjusting value
119- tune: value to increment/decrement when fine tunning the value
120- function: called on every value change
121-
122- VALUE(text,value)
123- holding possible FIELD values
124- where:
125- text: to be used as prompt
126- value: to be passed when selected
107+ #### Option
108+ ``` c++
109+ OP (name,function)
110+ ```
111+ Menu option, call user function on click
112+
113+ **name**: string to be shown as menu option prompt
114+
115+ **function**: to be called on click
116+
117+ #### Numeric field
118+ ```c++
119+ FIELD(variable,name,units,min,max,step,tune,function)
120+ ```
121+
122+ Holding and changing numeric values
123+
124+ ** variable** : holding the value (must be numeric or support comparison oprators)
125+
126+ ** name** : to use as prompt
127+
128+ ** units** : to be shown after value
129+
130+ ** min,max** : defining numeric value range
131+
132+ ** step** : increment/decrement when adjusting value
133+
134+ ** tune** : value to increment/decrement when fine tunning
135+ the value
136+
137+ ** function** : called on every value change
127138
139+ #### Field value
140+ ``` c++
141+ VALUE (text,value)
142+ ```
143+
144+ holding possible FIELD values
145+
146+ **text**: to be used as prompt
147+
148+ **value**: to be passed when selected
149+
150+ #### Toggle field value
151+ ```c++
128152 TOGGLE(variable,id,name,
129153 VALUE(...),
130154 ...,
131155 VALUE(...)
132156 )
133- Holding a value and a list of possible values to toggle on click
134- this is ideal for On/Off Yes/No and other small list of values
135- where:
136- variable: holding the value
137- id: of this element to be used with SUBMENU
138- name: to be used as prompt
139-
140- SELECT(variable,id,name,
141- VALUE(...),
142- ...,
143- VALUE(...)
144- )
145- define a value from a list of possibilities
146- click to enter edit mode
147- rotate to choose value
148- click to exit edit mode
149- where:
150- variable: holding the value
151- id: of this element to be used with SUBMENU
152- name: to be used as prompt
153-
154- CHOOSE(variable,id,name,
157+ ```
158+
159+ Holding a value and a list of possible values to toggle on click. This is ideal for On/Off Yes/No and other small list of values
160+
161+ ** variable** : holding the value
162+
163+ ** id** : of this element to be used with SUBMENU
164+
165+ ** name** : to be used as prompt
166+
167+ #### Select field value
168+ ``` c++
169+ SELECT (variable,id,name,
155170 VALUE(...),
156171 ...,
157172 VALUE(...)
158173 )
159- Holding a value and a list of possible values to select as a submenu
160- this is ideal for longer lists of values
161- where:
162- variable: holding the value
163- id: of this element to be used with SUBMENU
164- name: to be used as prompt
165-
166- SUBMENU(id)
167- link in a submenu as option of the current one
168- where:
169- id: the submenu id
170-
171- MENU(id,name,
172- ...
173- OP(...),
174- FIELD(...),
175- SUBMENU(...),
176- ...
177- )
178- define menu structure
179- where:
180- id: this menu id
181- name: menu name to use as submenu title
174+ ```
175+
176+ define a value from a list of possibilities
177+ click to enter edit mode
178+ rotate to choose value
179+ click to exit edit mode
180+
181+ **variable**: holding the value
182+
183+ **id**: of this element to be used with SUBMENU
184+
185+ **name**: to be used as prompt
186+
187+ #### Choose field value
188+ ```c++
189+ CHOOSE(variable,id,name,
190+ VALUE(...),
191+ ...,
192+ VALUE(...)
193+ )
194+ ```
195+
196+ Holding a value and a list of possible values to select as a submenu. This is ideal for longer lists of values.
197+
198+ ** variable** : holding the value
199+
200+ ** id** : of this element to be used with SUBMENU
182201
202+ ** name** : to be used as prompt
203+
204+ #### Submenu
205+ ``` c++
206+ SUBMENU (id)
207+ ```
208+
209+ link in a submenu as option of the current one
210+
211+ **id**: the submenu id
212+
213+ #### Menu
214+ ```c++
215+ MENU(id,name,
216+ ...
217+ OP(...),
218+ FIELD(...),
219+ SUBMENU(...),
220+ ...
221+ )
222+ ```
223+
224+ define menu structure
225+
226+ ** id** : this menu id
227+
228+ ** name** : menu name to use as submenu title
183229
184230## History
185231
186232### 2.3
187233
188234- actions functions need to return bool now (only affects menus)
189- false = continue menu
190- true = exit menu
235+
236+ false = continue menu
237+ true = exit menu
238+
191239- Support for U8GLib screens
192240- alternative use of ClickEncoder
193241- using flash memory to store menu strings and lists (PROGMEM)
242+ - new field type SELECT
243+ - reflexivity, field reflect external changes to values
194244
195245### 2.0
196246
197- main changes:
198247- non-blocking menu main cycle
199248- Menufields as menu prompts with associated value
200249 values can be:
@@ -203,6 +252,9 @@ main changes:
203252 list of values selected as submenu (for longer lists)
204253- PCINT now supports Mega/2560 and possibly others
205254
255+ ### 1.x
256+ - basic menu functionality
257+
206258## notes
207259
208260encoder now needs begin() to be called on setup
0 commit comments