]> sigrok.org Git - libsigrok.git/commitdiff
scpi-pps: Don't block waiting for a value on capture stop.
authorMartin Ling <redacted>
Mon, 10 Sep 2018 15:10:31 +0000 (16:10 +0100)
committerMartin Ling <redacted>
Mon, 10 Sep 2018 15:12:58 +0000 (16:12 +0100)
The comment says "A requested value is certainly on the way", but the code no
longer works this way. The receive handler requests a value and blocks until
it is received. There is no value pending between receive handler calls, so
this code now only leads to a timeout.

src/hardware/scpi-pps/api.c

index c0b32e13e45faee84c355995a907c295bff90e99..c2ed416ab46d9bf7906f9c28f4d4a0fe58ab2274 100644 (file)
@@ -647,18 +647,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
 static int dev_acquisition_stop(struct sr_dev_inst *sdi)
 {
        struct sr_scpi_dev_inst *scpi;
-       double d;
 
        scpi = sdi->conn;
 
-       /*
-        * A requested value is certainly on the way. Retrieve it now,
-        * to avoid leaving the device in a state where it's not expecting
-        * commands.
-        *
-        * TODO: Doesn't work for (at least) the HP 66XXB models.
-        */
-       sr_scpi_get_double(scpi, NULL, &d);
        sr_scpi_source_remove(sdi->session, scpi);
 
        std_session_send_df_end(sdi);