getValue¶
getValue(source)
Returns the value of a source.
Parameters¶
| Name | Req | Type | Description |
|---|---|---|---|
source | yes | string | can be an index (number) (which was obtained by getFieldInfo or getSourceIndex) or a name (string) of the source. |
Returns¶
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- | integer | current source value (number). Zero is returned for:
| |||||||||||||||
- | table | GPS position is returned in a table: | |||||||||||||||
| |||||||||||||||||
- | table | GPS date/time, see getDateTime() | |||||||||||||||
- | table | Cells are returned in a table (except where no cells were detected in which case the returned value is 0):
| |||||||||||||||
Availability¶
- Since:
2.0.0 - Radio support:
all
Notes¶
- Getting a value by its numerical identifier is faster then by its name. While
Celssensor returns current values of all cells in a table, aCels+orCels-will return a single value - the maximum or minimum Cels value.
Source¶
radio/src/lua/api_general.cpp