Make sure fine caldacs are reset before attempting to recalibrate
authorFrank Mori Hess <fmhess@speakeasy.net>
Fri, 3 Feb 2006 01:06:30 +0000 (01:06 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Fri, 3 Feb 2006 01:06:30 +0000 (01:06 +0000)
coarse caldacs for unipolar ai.

comedi_calibrate/ni.c

index 3ae5a27daa312f68d5928b42389b2f3b5cae5827..971e2b752ebc5c6489e1a788a37b05d45f631e54 100644 (file)
@@ -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,