rearranged order of 611x observables to deal with only having 2 ai channels on 6111
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 25 Nov 2002 21:05:13 +0000 (21:05 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 25 Nov 2002 21:05:13 +0000 (21:05 +0000)
comedi_calibrate/ni.c

index 61781825eccb3ac6518b7cd654410ee532e64e4f..4db9f34c4f936c43157e212853a74f33159ccf72 100644 (file)
@@ -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)