Fix 1V adc range on 4020.
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 29 Jul 2007 02:16:26 +0000 (02:16 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 29 Jul 2007 02:16:26 +0000 (02:16 +0000)
comedi/drivers/cb_pcidas64.c

index 6bd77a5bba9726b5648a8002e7d1e67a2d04d752..4c4d2c82b2859a06247dc02e72eb5d91fc45ab7d 100644 (file)
@@ -1907,7 +1907,7 @@ static int ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsa
                        priv(dev)->i2c_cal_range_bits |= adc_src_4020_bits( 4 );
                }
                // select range
-               if( ai_range_bits_6xxx( dev, range ) )
+               if(range == 0)
                        priv(dev)->i2c_cal_range_bits |= attenuate_bit( channel );
                else
                        priv(dev)->i2c_cal_range_bits &= ~attenuate_bit( channel );
@@ -2573,7 +2573,7 @@ static int setup_channel_queue(comedi_device *dev, const comedi_cmd *cmd)
                        unsigned int channel = CR_CHAN(cmd->chanlist[i]);
                        unsigned int range = CR_RANGE(cmd->chanlist[i]);
 
-                       if(ai_range_bits_6xxx(dev, range))
+                       if(range == 0)
                                priv(dev)->i2c_cal_range_bits |= attenuate_bit(channel);
                        else
                                priv(dev)->i2c_cal_range_bits &= ~attenuate_bit(channel);