From: Frank Mori Hess Date: Sun, 29 Jul 2007 02:16:26 +0000 (+0000) Subject: Fix 1V adc range on 4020. X-Git-Tag: r0_7_74~23 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e15e6f040a94a9612ce21492a8a42e807dcd1074;p=comedi.git Fix 1V adc range on 4020. --- diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index 6bd77a5b..4c4d2c82 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -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);