Jomelo/LCDMenuLib

Change parameter at menu item

Closed this issue · 11 comments

How do I change parameter directly on any menu item

like
Main
feature1 (here to enable or disable directly without jumping at submenu, just left or right)
feature2 (here change value without jump to another submenu just left or right)

And so on
picture 2017-08-29 16_23_27
picture 2017-08-29 16_24_30

Hello,
on a direct way it is not possible. But you can open a menufunction and change a global variable.

Then you can open the "LCDML_dynamic_menuitem_text" example and open the "LCDML_DISP" tab. On line 32 you can find this code.

// set content
		// with content id you can add special content to your static menu or replace the content
		// the content_id contains the id wich is set on main tab for a menuitem
        switch(LCDML.content_id[n])
		{		 
			case 0:
				lcd.print("Sec counter: "); // or datetime or other things
				lcd.print(g_sec_counter);
				break;
		
			default: // static content
				lcd.print(LCDML.content[n]);
				break;				
} 

You can add here another case option with your menu item id to change the content and display your custom chars.

I add this function to version 3.0.0. Then it is possible to change content with the button when the cursor stands on an element.

So much tanks

I have a question, version 3.0.0 is released and stable or still under development?

It is a development version. I try to release the first beta in some hours.
There are some small bugs at the moment:

  • jump to hidden submenues does not work correctly

ToDo:

  • rename LCDML_add to LCDML_addAdvanced when all callback functions are used
  • add a callbackfunction for the screensaver
  • add error codes for some debug errors
  • some changes on the backend system (backend and lcdml can use as standalone)

When i add a tag with "beta" i won`t change the functionnames and fix only bugs or add example.

You can test the beta

Congrats and thanks

Do you have an scheduled date for a new stable version with all working functions

Not at the moment. The library is only a hobby :-)

Another question, it will work on arduino due or others arm32 mcus or need to modify sources? if so , it'll be hard to do?

I haven't test it for other controllers. On arduinos it works.
I think you need a c++ compiler for the other controller and define some data types, set the "use ram" parameter in "LCDMenuLib.h".

Too the orginal questions:
https://github.com/Jomelo/LCDMenuLib2