#include <MenuItems.h>
FloatMenuItem is for situations where absolute accuracy of the value is not important, for example showing a calculated value from some sensors.
- See also
- FloatMenuInfo
◆ FloatMenuItem() [1/2]
FloatMenuItem::FloatMenuItem |
( |
const FloatMenuInfo * |
info, |
|
|
MenuItem * |
next, |
|
|
bool |
infoInPgm = INFO_LOCATION_PGM |
|
) |
| |
|
inline |
Create an instance of the class
- Parameters
-
info | a FloatMenuInfo structure |
next | the next menu in the chain if there is one, or NULL. |
infoInPgm | if the info block is in program memory |
◆ FloatMenuItem() [2/2]
FloatMenuItem::FloatMenuItem |
( |
const FloatMenuInfo * |
info, |
|
|
float |
current, |
|
|
MenuItem * |
next, |
|
|
bool |
infoInPgm = INFO_LOCATION_PGM |
|
) |
| |
|
inline |
Create an instance of the class setting the default value.
- Parameters
-
info | a FloatMenuInfo structure |
current | current value as a float |
next | the next menu in the chain if there is one, or NULL. |
infoInPgm | if the info block is in program memory |
◆ getDecimalPlaces()
int FloatMenuItem::getDecimalPlaces |
( |
| ) |
const |
return the number of decimal places to display for this value
◆ setFloatValue()
void FloatMenuItem::setFloatValue |
( |
float |
newVal, |
|
|
bool |
silent = false |
|
) |
| |
Set the floating point value and mark as changed
◆ getFloatValue()
float FloatMenuItem::getFloatValue |
( |
| ) |
const |
|
inline |
Get the current floating point value
The documentation for this class was generated from the following files: