Skip to content

getSourceValue

getSourceValue(source)

Returns the value of a source. Superseeds getValue.

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), or last known telemetry item value.
isCurrent unknown is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items.
isFresh unknown is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items.

Availability

  • Since: 2.0.0
  • Radio support: all

Notes

  • Getting a value by its numerical identifier is much faster than by its name. While Cels sensor returns current values of all cells in a table, a Cels+ or Cels- will return a single value - the maximum or minimum Cels value.

Source

radio/src/lua/api_general.cpp