From d4fd5f7b087d96676f53d3d74fde681baa26270c Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Fri, 3 Feb 2006 01:06:30 +0000 Subject: [PATCH] Make sure fine caldacs are reset before attempting to recalibrate coarse caldacs for unipolar ai. --- comedi_calibrate/ni.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/comedi_calibrate/ni.c b/comedi_calibrate/ni.c index 3ae5a27..971e2b7 100644 --- a/comedi_calibrate/ni.c +++ b/comedi_calibrate/ni.c @@ -1387,12 +1387,15 @@ static int cal_ni_generic( calibration_setup_t *setup, const ni_caldac_layout_t layout->adc_pregain_offset, 1 ); generic_peg( setup, ni_unip_zero_offset_low, layout->adc_postgain_offset, 1 ); + reset_caldac(setup, layout->adc_gain_fine); generic_do_relative( setup, current_cal, ni_unip_zero_offset_low, ni_unip_reference_low, layout->adc_gain ); + reset_caldac(setup, layout->adc_postgain_offset_fine); generic_do_relative( setup, current_cal, ni_unip_zero_offset_low, ni_unip_zero_offset_high, layout->adc_postgain_offset ); generic_do_relative( setup, current_cal, ni_unip_zero_offset_low, ni_unip_zero_offset_high, layout->adc_postgain_offset_fine ); + reset_caldac( setup, layout->adc_pregain_offset_fine ); generic_do_cal( setup, current_cal, ni_unip_zero_offset_high, layout->adc_pregain_offset ); generic_do_relative( setup, current_cal, ni_unip_zero_offset_low, -- 2.26.2