From: Frank Mori Hess Date: Wed, 27 Jun 2001 19:51:11 +0000 (+0000) Subject: made ao_waveform use same parse_options() as other demos X-Git-Tag: r0_7_16~64 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e252726146911224d653329417b7a6c60ad3fe47;p=comedilib.git made ao_waveform use same parse_options() as other demos --- diff --git a/demo/ao_waveform.c b/demo/ao_waveform.c index d0ef7f8..efaa785 100644 --- a/demo/ao_waveform.c +++ b/demo/ao_waveform.c @@ -90,7 +90,6 @@ void dds_init_sawtooth(void); int main(int argc, char *argv[]) { - char *fn = NULL; comedi_cmd cmd; int err; int n,m; @@ -98,13 +97,13 @@ int main(int argc, char *argv[]) comedi_t *dev; unsigned int chanlist[1]; - if(argc>=2){ - waveform_frequency=strtod(argv[1],NULL); - } + parse_options(argc,argv); - fn = "/dev/comedi0"; + if(value){ + waveform_frequency = value; + } - dev = comedi_open(fn); + dev = comedi_open(filename); subdevice = comedi_find_subdevice_by_type(dev,COMEDI_SUBD_AO,0);