From ca615cb0fe2b7f95af973ff022c4381bb9f8972b Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Mon, 21 Jul 2003 19:23:58 +0000 Subject: [PATCH] updated pci-6031e status to STATUS_DONE, and made pegs happen only when caldacs are reset. --- comedi_calibrate/cal_common.c | 2 +- comedi_calibrate/ni.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/comedi_calibrate/cal_common.c b/comedi_calibrate/cal_common.c index a1c4704..b3854e7 100644 --- a/comedi_calibrate/cal_common.c +++ b/comedi_calibrate/cal_common.c @@ -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 diff --git a/comedi_calibrate/ni.c b/comedi_calibrate/ni.c index 52c6b42..294dec0 100644 --- a/comedi_calibrate/ni.c +++ b/comedi_calibrate/ni.c @@ -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, -- 2.26.2