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.
Builds a complete sensor settings object from a raw
sensor_settingsvalue.Reads the older field names
scan_rate(forscans_per_read) andsampling_rate(forscan_rate_hz) when the new ones are absent. Missing or non-finite numbers take the values in DEFAULT_SENSOR_SETTINGS.data_formatsandmeasurement_unitsare padded with"voltage"and"V"to one entry per enabled channel. Arrays andcalibrationsare shallow copies.filtersis cleaned withnormalizeFilterMapand set only when some channel has a filter on, so a config without filters keeps its shape.