Removed some dead code.
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 10 Jul 2007 14:08:07 +0000 (14:08 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 10 Jul 2007 14:08:07 +0000 (14:08 +0000)
demo/gpct_simple_counting.c

index a8fe24450da0818eacb8ce68275ca08417ca7b67..c05954a99a0767a0f25b5c8019c8198f08aceb56 100644 (file)
@@ -30,7 +30,7 @@
 #include <ctype.h>
 #include "examples.h"
 
-int ni_gpct_start_simple_event_counting(comedi_t *device, unsigned subdevice, unsigned period_ns, unsigned up_time_ns)
+int ni_gpct_start_simple_event_counting(comedi_t *device, unsigned subdevice)
 {
        int retval;
        lsampl_t counter_mode;
@@ -72,19 +72,11 @@ int ni_gpct_start_simple_event_counting(comedi_t *device, unsigned subdevice, un
 int main(int argc, char *argv[])
 {
        comedi_t *device;
-       unsigned up_time;
-       unsigned period_ns;
        int retval;
        struct parsed_options options;
 
        init_parsed_options(&options);
-       options.value = -1.;
        parse_options(&options, argc, argv);
-       period_ns = lrint(1e9 / options.freq);
-       if(options.value < 0.)
-               up_time = period_ns / 2;
-       else
-               up_time = lrint(options.value);
        device = comedi_open(options.filename);
        if(!device)
        {
@@ -94,7 +86,7 @@ int main(int argc, char *argv[])
        /*FIXME: check that device is counter */
        printf("Initiating simple event counting on subdevice %d.\n", options.subdevice);
 
-       retval = ni_gpct_start_simple_event_counting(device, options.subdevice, period_ns, up_time);
+       retval = ni_gpct_start_simple_event_counting(device, options.subdevice);
        if(retval < 0) return retval;
        return 0;
 }