It is possible to secure sub-menus in tcMenu by setting the secured switch in the designer UI. Once this is done, and as long as there is an authenticator within your sketch that is assigned to the menu manager, then there is nothing else to do.
First, during the design phase, ensure that you select to secure the sub-menu. It is recommended that such menus are marked as local only, so they cannot be sent remotely:
Then, in your sketch you must add an AuthenticationManager
that will be responsible for deciding if the password entered is correct. There are three choices: NoAuthentication, EEPROM Authentication and ReadOnly (in flash) Authentication. See the following page that discusses the set up of authentication.
Ensure that the authenticator you create is added to the menuMgr
object as follows in the setup of your sketch:
menuMgr.setAuthenticator(&authManager);
With these two in place, on attempting to access the secured menu, you’ll see a screen that looks something like the following, where you need to enter the password and select proceed.
This is a standard text control in password mode. When in password mode only the character being edited is visible. Others are shown by *
. To start editing the password click the select button, and the first character can be edited. Pressing the select key confirms the character an then the next character becomes editable. To stop editing move the encoder to the minimum position and press select again. The editing will now stop. You can now choose Proceed
to continue to the secure menu.