Avena Webapp API - v0.0.1
    Preparing search index...

    Function resolveCalibrationUnit

    • Works out the unit a channel's calibrated values are in.

      • Identity: always RAW_UNIT, whatever else is configured.
      • Otherwise the calibration's own unit when set.
      • Otherwise (configs written before calibrations had a unit) the channel's measurement_units entry, unless it is blank or V: V was the value filled in when nobody chose a unit, so it says nothing about a calibrated channel.

      Parameters

      • calibration: CalibrationSpec

        Normalized calibration of the channel.

      • OptionalmeasurementUnit: string | null

        The channel's measurement_units entry, if any.

      Returns string | undefined

      The unit, or undefined when a calibrated channel has no known unit.