From: Martin Ling Date: Tue, 21 Jan 2014 16:51:01 +0000 (+0000) Subject: rigol-ds: Disable key lock when closing device. X-Git-Tag: libsigrok-0.3.0~215 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=22c196883d50849ac3a6ed3bffa98e43b6155069;p=libsigrok.git rigol-ds: Disable key lock when closing device. --- diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index 40193160..a20dd659 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -481,8 +481,13 @@ static int dev_open(struct sr_dev_inst *sdi) static int dev_close(struct sr_dev_inst *sdi) { struct sr_scpi_dev_inst *scpi; + struct dev_context *devc; scpi = sdi->conn; + devc = sdi->priv; + + if (devc->model->series != RIGOL_VS5000) + set_cfg(sdi, ":KEY:LOCK DISABLE"); if (scpi) { if (sr_scpi_close(scpi) < 0)