FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kLdCalLookup_LimitToInput ( kLdCalLookup  lookup,
k64f  limit,
k64f  temperature,
kSize input,
k64f expectedLimit 
)

Calculates the current limit input expected to produce specified optical power at the specified temperature.

Resulting output selects the nearest input, even if it results in optical power that is higher than requested.

All specified powers must already account for margins due to uncertainty in digital pot resolution, accuracy of the calibration methodology or efficiency of the optical path.

For example, with resolution of the pot at 10% of the input, the returned power may fall within +/- 10% of the specified before accounting for calibration error, temperature compensation uncertainty, optical path efficiency uncertainty

While granularity of the digital pot is only one component of the uncertainty, the optional 'expectedLimit' output parameter may be passed in to determine the exact calibrated optical power corresponding to the specified input

Parameters
lookupLookup object.
limitRequested optical power.
temperatureDriver temperature at which the power is queried. Specify k64F_NULL to default to the calibration temperature.
inputDriver input, in device units, closest to the requested power at specified temperature.
expectedLimitOptional output parameter receiving the exact calibrated optical power corresponding to the specified input.
Returns
Operation status.