Register / Login  |  Desktop view  |  Jump to bottom of page

tcMenu Arduinio library » How to OPEN/CLOSE the menu?

Author: Lee_X
29/04/2022 14:10:30
Hi I can't find an answer to a very simple question: how to make the menu appear and disappear?

I need the menu only to appear in certain conditions and use the encoders for other UI functions otherwise.

How can I completely release it?

Please let me know asap

Thanks!

Author: Lee_X
29/04/2022 16:56:15
is it just a matter of blanking the screen and not calling taskManager.runLoop()?

or is there a more elegant way to do this?

Author: davetcc
30/04/2022 08:57:14
Firstly, please understand that this forum is run by volunteers, we simply can't process things ASAP.

The menu starts out initialised and running, so once you build it onto a board it will immediately start if everything is configured correctly.

You take over the display when you want to use it yourself. You'll be called back in what's often referred to as a "game loop" where you refresh the screen if you need to. It will give you the current value of the encoder and also if the button has been pressed. This suffices for some but not all. When you need more control over the input, you can manually provide the input facilities yourself.

Take over display: http://thecoderscorner.com/products/arduino-libraries/tc-menu/renderer-take-over-display/

Providing input to tcMenu manually: http://thecoderscorner.com/products/arduino-libraries/tc-menu/menumanager-and-iteration/#controlling-the-menu-items-manually

Author: davetcc
30/04/2022 09:14:51
In fact there is even an example dedicateed to taking over the display called IIRC takeOverDisplay.

Author: Lee_X
30/04/2022 09:48:58
Thanks a lot Dave I'll have a look shortly




Register / Login  |  Desktop view  |  Jump to top of page