From: Ian Abbott Date: Thu, 22 Nov 2007 18:11:22 +0000 (+0000) Subject: Support -c channel and -r range options. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=94ad4788d97053832b1ec7ae0f19ba99db7770b7;p=comedilib.git Support -c channel and -r range options. --- diff --git a/demo/ao_waveform.c b/demo/ao_waveform.c index ad6d823..10d07d1 100644 --- a/demo/ao_waveform.c +++ b/demo/ao_waveform.c @@ -107,8 +107,8 @@ int main(int argc, char *argv[]) if(options.subdevice < 0) options.subdevice = comedi_find_subdevice_by_type(dev, COMEDI_SUBD_AO, 0); - maxdata = comedi_get_maxdata(dev, options.subdevice, 0); - rng = comedi_get_range(dev, options.subdevice, 0, 0); + maxdata = comedi_get_maxdata(dev, options.subdevice, options.channel); + rng = comedi_get_range(dev, options.subdevice, options.channel, options.range); offset = (double)comedi_from_phys(0.0, rng, maxdata); amplitude = (double)comedi_from_phys(1.0, rng, maxdata) - offset; @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) cmd.chanlist_len = options.n_chan; chanlist[0] = CR_PACK(options.channel, options.range, options.aref); - chanlist[1] = CR_PACK(options.channel + 1, options.range, options.aref); + //chanlist[1] = CR_PACK(options.channel + 1, options.range, options.aref); dds_init(waveform_frequency, options.freq);