updated pci-6031e status to STATUS_DONE, and made pegs happen only
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 21 Jul 2003 19:23:58 +0000 (19:23 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 21 Jul 2003 19:23:58 +0000 (19:23 +0000)
when caldacs are reset.

comedi_calibrate/cal_common.c
comedi_calibrate/ni.c

index a1c4704184aaa0ab768413e64bd297f61acb2d98..b3854e7d404f2aff4dc06dae82cd8867875fb96d 100644 (file)
@@ -239,7 +239,7 @@ static void generic_do_adc_postgain_offset( calibration_setup_t *setup, const ge
                highgain = get_bipolar_highgain( setup->dev, setup->ad_subdev );
        }
        generic_prep_adc_caldacs( setup, layout, channel, highgain );
-       if( unipolar )
+       if( unipolar && setup->old_calibration == NULL )
        {
                /* Need to make sure we aren't stuck on zero for unipolar,
                 * by setting pregain offset to maximum.  Use bipolar lowgain
index 52c6b420cd9c79bdfa07229fa0d2b21252993909..294dec04301257c4f4eefb03a958f354886dc0b9 100644 (file)
@@ -92,7 +92,7 @@ static struct board_struct boards[]={
        { "pci-6023e", STATUS_DONE, cal_ni_pci_6023e, ni_setup_observables, 0x1bb, 0x1bc },
        { "pci-6024e", STATUS_SOME, cal_ni_pci_6024e, ni_setup_observables, 0x1af, 0x1b0 },
        { "pci-6025e", STATUS_SOME, cal_ni_pci_6025e, ni_setup_observables, 0x1af, 0x1b0 },
-       { "pci-6031e", STATUS_SOME, cal_ni_pci_mio_16xe_10, ni_setup_observables, 0x1ae, 0x1af },
+       { "pci-6031e", STATUS_DONE, cal_ni_pci_mio_16xe_10, ni_setup_observables, 0x1ae, 0x1af },
        { "pci-6032e", STATUS_DONE, cal_ni_pci_6032e, ni_setup_observables, 0x1ae, 0x1af },
        { "pci-6033e", STATUS_UNKNOWN, NULL, ni_setup_observables, 0x1ae, 0x1af },
        { "pci-6034e", STATUS_UNKNOWN, NULL, ni_setup_observables, -1, -1 },
@@ -1248,8 +1248,9 @@ static int cal_ni_generic( calibration_setup_t *setup, const ni_caldac_layout_t
                }else
                {
                        prep_adc_caldacs_generic( setup, layout, ai_unipolar_lowgain );
-                       generic_peg( setup, ni_unip_zero_offset_low,
-                               layout->adc_pregain_offset, 1 );
+                       if( setup->old_calibration == NULL )
+                               generic_peg( setup, ni_unip_zero_offset_low,
+                                       layout->adc_pregain_offset, 1 );
                        generic_do_relative( setup, current_cal, ni_unip_zero_offset_low,
                                ni_unip_reference_low, layout->adc_gain );
                        generic_do_relative( setup, current_cal, ni_unip_zero_offset_low,