From e252726146911224d653329417b7a6c60ad3fe47 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 27 Jun 2001 19:51:11 +0000 Subject: [PATCH] made ao_waveform use same parse_options() as other demos --- demo/ao_waveform.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); -- 2.26.2