From: Frank Mori Hess Date: Mon, 25 Nov 2002 21:05:13 +0000 (+0000) Subject: rearranged order of 611x observables to deal with only having 2 ai channels on 6111 X-Git-Tag: r0_7_21~283 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7f188a8354e1c557e4ea370d1c4df3def59aadb2;p=comedilib.git rearranged order of 611x observables to deal with only having 2 ai channels on 6111 --- diff --git a/comedi_calibrate/ni.c b/comedi_calibrate/ni.c index 6178182..4db9f34 100644 --- a/comedi_calibrate/ni.c +++ b/comedi_calibrate/ni.c @@ -122,17 +122,18 @@ enum observables{ ni_ao1_zero_offset, ni_ao1_reference, }; + +enum observables_611x{ + ni_ao0_zero_offset_611x = 0, + ni_ao0_reference_611x = 1, + ni_ao1_zero_offset_611x = 2, + ni_ao1_reference_611x = 3, +}; inline static int ni_zero_offset_611x( int channel ) { - return channel; + return 4 + 2 * channel; }; inline static int ni_reference_611x( int channel ) { - return 4 + channel; -}; -enum observables_611x{ - ni_ao0_zero_offset_611x = 8, - ni_ao0_reference_611x = 9, - ni_ao1_zero_offset_611x = 10, - ni_ao1_reference_611x = 11, + return 5 + 2 * channel; }; enum reference_sources { @@ -428,7 +429,7 @@ void ni_setup_observables_611x( calibration_setup_t *setup ) o->reference_source = REF_DAC1_GND; set_target( setup, ni_ao1_reference_611x, 5.0 ); - setup->n_observables = ni_ao1_reference_611x + 1; + setup->n_observables = 4 + 2 * num_chans; } int cal_ni_at_mio_16e_2(calibration_setup_t *setup)