From: Martin Ling Date: Mon, 10 Sep 2018 15:10:31 +0000 (+0100) Subject: scpi-pps: Don't block waiting for a value on capture stop. X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=49f7cb24259851b1b8b5c5fc863343c90a7366a4 scpi-pps: Don't block waiting for a value on capture stop. 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. --- diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c index c0b32e13..c2ed416a 100644 --- a/src/hardware/scpi-pps/api.c +++ b/src/hardware/scpi-pps/api.c @@ -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);