X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/blobdiff_plain/616d54b715cbfdd3547724e19fff416046fdc44d..b131d433f9b984b50266298be6f0cf7f9a13b6fb:/rigol.c diff --git a/rigol.c b/rigol.c index 93b8566..3386fbf 100644 --- a/rigol.c +++ b/rigol.c @@ -104,6 +104,7 @@ int main(int argc, char **argv) //Initialize scope sc = usbtmc_initscope(); + usbtmc_claim(sc); buff = malloc (1024*1024); if (buff == NULL) { perror("malloc"); @@ -162,11 +163,7 @@ int main(int argc, char **argv) } free (scpi); } - //Disable keylock, so the user doesn't have to press the 'force'-button - l=usbtmc_sendscpi(sc, ":KEY:LOCK DISABLE",NULL,0); - - //Free up and exit - usb_release_interface(sc,0); - usb_close(sc); + usbtmc_release(sc); + usbtmc_close(sc); return 0; }