]> git.zerfleddert.de Git - rigol/commitdiff
follow USBTMC spec more closely, more to come...
authorMichael Gernoth <michael@gernoth.net>
Sun, 6 Jun 2010 21:03:04 +0000 (23:03 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 6 Jun 2010 21:03:04 +0000 (23:03 +0200)
usbtmc.c

index 729f6db5028d016c361ce8213662aab73647256d..622ea8099914c8f26746ef288d4e6483a8b29308 100644 (file)
--- a/usbtmc.c
+++ b/usbtmc.c
@@ -61,9 +61,9 @@ int usbtmc_sendscpi(usb_dev_handle *dev, char* cmd,
        buff[3]=0;
        int2chars(buff+4, cmdlen);
        buff[8]=1;
        buff[3]=0;
        int2chars(buff+4, cmdlen);
        buff[8]=1;
-       buff[9]=0x37;
-       buff[10]=0x39;
-       buff[11]=0x39;
+       buff[9]=0x00;
+       buff[10]=0x00;
+       buff[11]=0x00;
        //fprintf(stderr,"Writing header len=%d\n", cmdlen);
        //printb(buff,12);
        r=usb_bulk_write(dev, 1, (char*)buff, 12, USB_TIMEOUT);
        //fprintf(stderr,"Writing header len=%d\n", cmdlen);
        //printb(buff,12);
        r=usb_bulk_write(dev, 1, (char*)buff, 12, USB_TIMEOUT);
@@ -77,7 +77,7 @@ int usbtmc_sendscpi(usb_dev_handle *dev, char* cmd,
                seq++;
                buff[1]=seq; buff[2]=~seq; //nseq
                int2chars(buff+4,0x40);
                seq++;
                buff[1]=seq; buff[2]=~seq; //nseq
                int2chars(buff+4,0x40);
-               buff[8]=1;
+               buff[8]=0;
                buff[9]=0xA;
                buff[10]=0;
                buff[11]=0;
                buff[9]=0xA;
                buff[10]=0;
                buff[11]=0;
Impressum, Datenschutz