[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 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

LargeFixedNumbers example code plz RSS feed
Forum Index » tcMenu Arduinio library
Author Message
Gcc26


Joined: Nov 18, 2020
Messages: 2
Offline
My C skills are not up to understading the info given on the webpage dealing with menu types. Ie enum, analog, boolean. I have looked through the examples without finding how to access a menu largefixed number. I did only need to use analogue. But now I'm wondering what I need to learn about LFN.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
You'll be glad to know that we are working on the menu type documentation at this very moment! Will be pushed to the site in the next week hopefully.

Take a look at the roadmap and you'll see that most of the tasks in the next couple of cycles are to do with documentation and site improvements, and if we need to make the cycle longer because we find more holes in the documentation, we will. Our focus in now stability and usability. If you have any other areas that are not clear, we'd be glad to hear of them!

https://www.thecoderscorner.com/products/product-roadmap/
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
For the time being until the documentation is updated, you can think of large number support as being for numbers well outside the range that you could edit with a rotary encoder.

For example lets say you needed something that represented all frequencies from 0 to 1Mhz, you could not present that with a rotary encoder. Instead, with large fixed number you can edit those one digit at at time, and the are stored in BCD format of up to 12 digits.

Here's a few examples for the time being, better docs coming soon.

LargeFixedNumber* num = menuItem.getLargeNumber();

// To read the latest as a floating point
float flt = num->getAsFloat()

// To read the latest as a whole and fraction
bool neg = num->isNegative()
uint32_t whole = num->getWhole()
uint32_t fr = num->getFraction()

// to set a new value from a float
num->setFromFloat(value);

// to set as a whole and fraction
num->setValue(whole, fraction, isNegative);
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
The documentation was today updated, and a new page has been created that documents large number support.

https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/menu-item-types/largenum-menu-item/

In fact this update was a major update, really cleaning up the whole tcMenu section of the site.
 
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.