make unipolar gain calibration work a little better
This commit is contained in:
parent
a61dcfa9f7
commit
11264f9d01
1 changed files with 9 additions and 0 deletions
|
@ -157,6 +157,15 @@ static void generic_do_dac_channel( calibration_setup_t *setup, const generic_la
|
|||
static void generic_do_adc_channel( calibration_setup_t *setup, const generic_layout_t *layout,
|
||||
comedi_calibration_setting_t *current_cal, unsigned int channel, unsigned int range )
|
||||
{
|
||||
/* make sure unipolar ground observable isn't out-of-range before
|
||||
* doing gain calibrations */
|
||||
if( is_unipolar( setup->dev, setup->ad_subdev, channel, range ) )
|
||||
{
|
||||
generic_do_cal( setup, current_cal, layout->adc_ground_observable( setup, channel, range ),
|
||||
layout->adc_offset( channel ) );
|
||||
generic_do_cal( setup, current_cal, layout->adc_ground_observable( setup, channel, range ),
|
||||
layout->adc_offset_fine( channel ) );
|
||||
}
|
||||
generic_do_relative( setup, current_cal, layout->adc_high_observable( setup, channel, range ),
|
||||
layout->adc_ground_observable( setup, channel, range ), layout->adc_gain( channel ) );
|
||||
generic_do_cal( setup, current_cal, layout->adc_ground_observable( setup, channel, range ),
|
||||
|
|
Loading…
Add table
Reference in a new issue