fn apply_calibration_value(&mut self, calib: &[CalibData]) -> Result<()> {
        let mut dsm_param = DSMParam::new(
            &mut self.card,
            self.setting.num_channels(),
            &self.setting.dsm_param_read_ctrl,
        )?;
        for ch in 0..self.setting.num_channels() {
            dsm_param.set_rdc(ch, calib[ch].rdc);
            dsm_param.set_ambient_temp(ch, Self::celsius_to_dsm_unit(calib[ch].temp));
        }
        self.card
            .control_tlv_by_name(&self.setting.dsm_param_write_ctrl)?
            .save(dsm_param.into())
            .map_err(Error::DSMParamUpdateFailed)?;
        Ok(())
    }
/// Applies the calibration value to the amp.
Applies the calibration value to the amp.
Applies the calibration value to the amp .
fn apply_calibration_value(&mut self, calib: &[CalibData]) -> Result<()> {
        let mut dsm_param = DSMParam::new(
            &mut self.card,
            self.setting.num_channels(),
            &self.setting.dsm_param_read_ctrl,
        )?;
        for ch in 0..self.setting.num_channels() {
            dsm_param.set_rdc(ch, calib[ch].rdc);
            dsm_param.set_ambient_temp(ch, Self::celsius_to_dsm_unit(calib[ch].temp));
        }
        self.card
            .control_tlv_by_name(&self.setting.dsm_param_write_ctrl)?
            .save(dsm_param.into())
            .map_err(Error::DSMParamUpdateFailed)?;
        Ok(())
    }
fn apply_calibration_value ( & mut self , calib : & [ CalibData ] ) -> Result < ( ) > { let mut dsm_param = DSMParam :: new ( & mut self . card , self . setting . num_channels ( ) , & self . setting . dsm_param_read_ctrl , ) ? ; for ch in 0 .. self . setting . num_channels ( ) { dsm_param . set_rdc ( ch , calib [ ch ] . rdc ) ; dsm_param . set_ambient_temp ( ch , Self :: celsius_to_dsm_unit ( calib [ ch ] . temp ) ) ; } self . card . control_tlv_by_name ( & self . setting . dsm_param_write_ctrl ) ? . save ( dsm_param . into ( ) ) . map_err ( Error :: DSMParamUpdateFailed ) ? ; Ok ( ( ) ) }
Applies the calibration value to the amp.
Applies the calibration value to the amp .
&mut self
calib
&[CalibData]
&mut self
calib
&[CalibData]