FUNCTBL

Function Tables are supported in v1.12+.

Syntax

[FUNCTBL, FUEL, <oorlowreal>, <oorhighreal>, <oorlowraw>, <oorhighraw>, <count>, <raw0>, <real0>, <raw1>, <real1>, ...., <rawcount-1>, <realcount-1>]

When defining a parameter, option, table or map, the scalar function is defined as a function table by specifying a name in brackets in the scalar field. For example:

1uint16_t FUELLVL;   // [Fuel level,l,(FUEL),,r,+,i,,]

The first label is always FUNCTBL and the name of the function table follows.

The raw (integer) value to which a real value is converted if it is lower than the lowest value in the table (oor meaning Out Of Range).

The raw (integer) value to which a real value is converted if it is higher than the highest value in the table (oor meaning Out Of Range).

The real value to which a raw value is converted when it is lower than any raw value in the table.

The real value to which a raw value is converted when it is higher than any raw value in the table.

The number of entries in the function table and is succeeded by the raw and real values of each entry.

Note that function tables must be continuously increasing or decreasing.

Type specifiers may be used. Useful if the value cannot be reasonably represented using a 32bit signed integer.