From: Martin Ling Date: Tue, 21 Jan 2014 02:23:38 +0000 (+0000) Subject: rigol-ds: DS1000 series still needs the stupid delay. X-Git-Tag: libsigrok-0.3.0~221 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=10d309c8abe03fa242409a6db398b4705cf6cf3d;p=libsigrok.git rigol-ds: DS1000 series still needs the stupid delay. --- diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index 087cc9a5..40193160 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -225,6 +225,7 @@ static int dev_clear(void) static int set_cfg(const struct sr_dev_inst *sdi, const char *format, ...) { + struct dev_context *devc = sdi->priv; va_list args; int ret; @@ -235,7 +236,14 @@ static int set_cfg(const struct sr_dev_inst *sdi, const char *format, ...) if (ret != SR_OK) return SR_ERR; - return sr_scpi_get_opc(sdi->conn); + if (devc->model->series == RIGOL_DS1000) { + /* The DS1000 series needs this stupid delay, *OPC? doesn't work. */ + sr_spew("delay %dms", 100); + g_usleep(100000); + return SR_OK; + } else { + return sr_scpi_get_opc(sdi->conn); + } } static int init(struct sr_context *sr_ctx)