From: Frank Mori Hess Date: Sat, 31 May 2003 16:59:29 +0000 (+0000) Subject: move some warning messages so they will actually get seen X-Git-Tag: r0_7_21~130 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=788056d3b06127b91f482ff483a4ef6ac2cd9b7f;p=comedilib.git move some warning messages so they will actually get seen --- diff --git a/comedi_calibrate/cb.c b/comedi_calibrate/cb.c index b8d886c..630301c 100644 --- a/comedi_calibrate/cb.c +++ b/comedi_calibrate/cb.c @@ -114,6 +114,12 @@ static int setup_cb_pci_1xxx( calibration_setup_t *setup ) static const int caldac_subdev = 4; static const int calpot_subdev = 5; + if( comedi_get_version_code( setup->dev ) <= COMEDI_VERSION_CODE( 0, 7, 66 ) ) + { + DPRINT(0, "WARNING: you need comedi driver version 0.7.67 or later\n" + "for this calibration to work properly\n" ); + } + retval = init_observables_1xxx( setup ); if( retval < 0 ) return retval; setup_caldacs( setup, caldac_subdev ); @@ -129,6 +135,12 @@ static int setup_cb_pci_1602_16( calibration_setup_t *setup ) static const int calpot_subdev = 5; static const int dac08_subdev = 6; + if( comedi_get_version_code( setup->dev ) <= COMEDI_VERSION_CODE( 0, 7, 66 ) ) + { + DPRINT(0, "WARNING: you need comedi driver version 0.7.67 or later\n" + "for this calibration to work properly\n" ); + } + retval = init_observables_1xxx( setup ); if( retval < 0 ) return retval; setup_caldacs( setup, caldac_subdev ); @@ -401,12 +413,6 @@ static int cal_cb_pci_1xxx( calibration_setup_t *setup ) { generic_layout_t layout; - if( comedi_get_version_code( setup->dev ) <= COMEDI_VERSION_CODE( 0, 7, 66 ) ) - { - DPRINT(0, "WARNING: you need comedi driver version 0.7.67 or later\n" - "for this calibration to work properly\n" ); - } - init_generic_layout( &layout ); layout.adc_gain = adc_gain_1xxx; layout.adc_offset = adc_offset_coarse_1xxx; @@ -471,12 +477,6 @@ static int cal_cb_pci_1602_16( calibration_setup_t *setup ) { generic_layout_t layout; - if( comedi_get_version_code( setup->dev ) <= COMEDI_VERSION_CODE( 0, 7, 66 ) ) - { - DPRINT(0, "WARNING: you need comedi driver version 0.7.67 or later\n" - "for this calibration to work properly\n" ); - } - init_generic_layout( &layout ); layout.adc_gain = adc_gain_1602_16; layout.adc_offset = adc_pregain_offset_1602_16;