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

    Function syncChannelCalibrations

    • Makes each enabled channel's calibration, unit and sensor type agree, in place.

      For every enabled channel, the calibration is normalized (a missing one becomes identity) and its unit set from resolveCalibrationUnit: V for identity, else the calibration's own unit, else a non-V measurement_units entry from an older config. That unit is copied to measurement_units so older readers see it, and for a calibrated channel data_formats is moved to a sensor type offering it (see sensorFormatForUnit). A calibrated channel with no known unit keeps its calibration without unit and its old labels; the form does not save such a channel. An id from an older config is kept. Calibrations of channels that are not enabled are left as they are.

      Parameters

      Returns SensorSettings

      sensor, for chaining.