]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hp-3457a/api.c
sr_dev_close(): Set status to SR_ST_INACTIVE.
[libsigrok.git] / src / hardware / hp-3457a / api.c
index 16b44a77a4a4ce44515d7456cb5b0fbd867c80fe..f58cfef90cc9774ea71e75bb37d6ad740c7224c0 100644 (file)
@@ -205,8 +205,6 @@ static int dev_open(struct sr_dev_inst *sdi)
        sr_scpi_send(scpi, "TRIG HOLD");
        sr_scpi_get_float(scpi, "NPLC?", &devc->nplc);
 
-       sdi->status = SR_ST_ACTIVE;
-
        return SR_OK;
 }
 
@@ -214,9 +212,6 @@ static int dev_close(struct sr_dev_inst *sdi)
 {
        struct sr_scpi_dev_inst *scpi = sdi->conn;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        /* Disable scan-advance (preserve relay life). */
        sr_scpi_send(scpi, "SADV HOLD");
        /* Switch back to auto-triggering. */
@@ -224,8 +219,6 @@ static int dev_close(struct sr_dev_inst *sdi)
 
        sr_scpi_close(scpi);
 
-       sdi->status = SR_ST_INACTIVE;
-
        return SR_OK;
 }
 
@@ -263,9 +256,6 @@ static int config_set(uint32_t key, GVariant *data,
 
        (void)cg;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        devc = sdi->priv;
 
        ret = SR_OK;
@@ -367,9 +357,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        GArray *ch_list;
        GSList *channels;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        scpi = sdi->conn;
        devc = sdi->priv;
 
@@ -378,7 +365,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        if (ret != SR_OK)
                return ret;
 
-       std_session_send_df_header(sdi, LOG_PREFIX);
+       std_session_send_df_header(sdi);
 
        front_selected = rear_selected = FALSE;
        devc->active_channels = NULL;