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 ),