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

    Function normalizeSensorSettings

    • Builds a complete sensor settings object from a raw sensor_settings value.

      Reads the older field names scan_rate (for scans_per_read) and sampling_rate (for scan_rate_hz) when the new ones are absent. Missing or non-finite numbers take the values in DEFAULT_SENSOR_SETTINGS. data_formats and measurement_units are padded with "voltage" and "V" to one entry per enabled channel. Arrays and calibrations are shallow copies. filters is cleaned with normalizeFilterMap and set only when some channel has a filter on, so a config without filters keeps its shape.

      Parameters

      • rawSensor: any

        Parsed sensor_settings from KV or from the edit modal. May be undefined or partial.

      Returns SensorSettings

      A new settings object with every field set.