many random changes
authorDavid Schleef <ds@schleef.org>
Sat, 27 May 2000 00:56:45 +0000 (00:56 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 27 May 2000 00:56:45 +0000 (00:56 +0000)
Makefile
demo/Makefile
demo/ao_waveform.c
demo/cmd.c
demo/info.c
lib/filler.c
perl/lperl

index 2adaf0129fbcabd18784624c7254268aee542c4b..0bc9d399fcbdec445b25437c657978abd7729e37 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,8 +27,8 @@ install:      dummy
        (cd include;install -m 644 comedilib.h ${INSTALLDIR}/include)
        (cd include;install -m 644 comedi.h ${INSTALLDIR}/include)
        install lib/libcomedi.so.${version} ${INSTALLDIR_LIB}
-       (cd $(INSTALLDIR_LIB);ln -s libcomedi.so.${version} libcomedi.so.${MAJOR})
-       (cd $(INSTALLDIR_LIB);ln -s libcomedi.so.${version} libcomedi.so)
+       (cd $(INSTALLDIR_LIB);ln -sf libcomedi.so.${version} libcomedi.so.${MAJOR})
+       (cd $(INSTALLDIR_LIB);ln -sf libcomedi.so.${version} libcomedi.so)
        install -m 644 lib/libcomedi.a ${INSTALLDIR_LIB}
        #/sbin/ldconfig -n ${INSTALLDIR}/lib
        install -d ${INSTALLDIR_DOC}
index e4d2e08178e6d286ecdc4e02458580e71021d350..d8912cb7b19c2b6f2f0221bda5977d09c5d48634 100644 (file)
@@ -5,7 +5,7 @@ CFLAGS +=-I ../include -I . -O2
 LDFLAGS=-L../lib/ -lcomedi -lm
 
 
-BINS=mode4 mode3 mode2 ao_waveform tut2 cmd tut1
+BINS=mode4 mode3 mode2 ao_waveform tut2 cmd tut1 antialias
 MBINS=inp inpn sv eeprom_dump info outp
 
 all: $(patsubst %,_mbins_%,$(MBINS)) $(patsubst %,_bins_%,$(BINS))
index 09c8485eab17bc415616b861935094c63b246826..6aeb4eef585da33479ca8e56cf76c75f5b236d66 100644 (file)
@@ -52,7 +52,7 @@ double waveform_frequency     = 100.0;
 
 /* update rate for the DAC, typically much higher than
    the frequency of the sine wave. */
-double update_frequency                = 200000.0;
+double update_frequency                = 50000.0;
 
 /* peak-to-peak amplitude, in DAC units (i.e., 0-4095) */
 double amplitude               = 4000;
index 892ef61963f706043abd8536d6042c828a32079c..7cb85e12d576e554b8460b831fc07146de0221bc 100644 (file)
@@ -62,7 +62,7 @@ static void do_cmd(comedi_t *dev)
        cmd.start_src =         TRIG_NOW;
        cmd.start_arg =         0;
 
-       cmd.scan_begin_src =    TRIG_TIMER;
+       cmd.scan_begin_src =    TRIG_FOLLOW;
        cmd.scan_begin_arg =    1;      /* in ns */
 
        cmd.convert_src =       TRIG_TIMER;
index 0040d7dc0e6746068e11aa756ed5d0ee954c636e..093f3fb999392f0c7c6e303f9de7e35889eecc33 100644 (file)
@@ -38,8 +38,11 @@ extern char *filename;
 
 int main(int argc,char *argv[])
 {
-       int i;
+       int i,j;
        int n_subdevices,type;
+       int chan,n_chans;
+       int n_ranges;
+       comedi_range *rng;
        
        parse_options(argc,argv);
 
@@ -59,8 +62,22 @@ int main(int argc,char *argv[])
                printf("subdevice %d:\n",i);
                type=comedi_get_subdevice_type(it,i);
                printf("  type: %d (%s)\n",type,subdevice_types[type]);
-               printf("  number of channels: %d\n",comedi_get_n_channels(it,i));
+               n_chans=comedi_get_n_channels(it,i);
+               printf("  number of channels: %d\n",n_chans);
                printf("  max data value: %d\n",comedi_get_maxdata(it,i,0));
+               n_ranges=comedi_get_n_ranges(it,i,0);
+               printf("  number of ranges: %d\n",n_ranges);
+               printf("  ranges:\n");
+               for(chan=0;chan<n_chans;chan++){
+                       printf("    chan%d:",chan);
+                       //printf(" (0x%08x)",comedi_get_rangetype(it,i,chan));
+                       for(j=0;j<n_ranges;j++){
+                               rng=comedi_get_range(it,i,chan,j);
+                               //printf(" %p",rng);
+                               printf(" [%g,%g]",rng->min,rng->max);
+                       }
+                       printf("\n");
+               }
        }
        
        return 0;
index dde1e0e095b6838ad43793339483c8014b1616e0..bc3f4648575eec9850af085eb985910a37f676fc 100644 (file)
@@ -102,12 +102,16 @@ comedi_range *get_rangeinfo(int fd,unsigned int range_type)
 {
        comedi_krange *kr;
        comedi_range *r;
+       int ret;
        int i;
 
        kr=malloc(sizeof(comedi_krange)*RANGE_LENGTH(range_type));
        r=malloc(sizeof(comedi_range)*RANGE_LENGTH(range_type));
 
-       ioctl_rangeinfo(fd,range_type,kr);
+       ret=ioctl_rangeinfo(fd,range_type,kr);
+       if(ret<0){
+               fprintf(stderr,"ioctl_rangeinfo(%d,0x%08x,%p)\n",fd,range_type,kr);
+       }
 
        for(i=0;i<RANGE_LENGTH(range_type);i++){
                r[i].min=kr[i].min*1e-6;
index 612dfc3fa5b2061596d19c636c03ab9c52784566..c63f63d244e0be7c7fec98d20c2aab7a14ef29c9 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-PERL_DL_NONLAZY=1 /usr/local/bin/perl -I./blib/arch -I./blib/lib -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 "$@"
+PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 "$@"