[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 

Example for getTime() RSS feed
Forum Index » tcMenu Arduinio library
Author Message
cerberosbln


Joined: Jun 16, 2021
Messages: 2
Offline
I've some trouble to get simply the values for hour, minutes and seconds in seperate variables from the time storage object. Are there some examples? Searching the forum and docs didn't help me.
davetcc


Joined: Jan 19, 2019
Messages: 492
Offline
Hi there, take a look at:

https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/editabletext-menu-item/ especially the section on "Working with complex editable items in code" which covers time storage.

Also you can see: https://www.thecoderscorner.com/ref-docs/tcmenu/html/class_time_formatted_menu_item.html

Generally, when you bring up the properties for a menu item in the UI, there's a link at the top to the online documentation for that menu item. Let us know if we can make the documentation easier to navigate around this, we've had a few goes at tidying it up now but user feedback is always the best way to improve it.

But essentially, you access them from the time structure that is returned, for example:

TimeStorage t = menuTime.getTime();
int hours = t.hours;
int mins = t.minutes;

cerberosbln


Joined: Jun 16, 2021
Messages: 2
Offline
Thanks, works perfect smilie
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.