]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-dso/api.c
Change SR_CONF_FILTER key to a boolean type.
[libsigrok.git] / src / hardware / hantek-dso / api.c
index 3ad928bdd79ac05e2a1d28baf91043b812f92c6f..ea6d59ccb26c7fc60b55772a99ee9b940686c2be 100644 (file)
@@ -166,7 +166,7 @@ static struct sr_dev_inst *dso_dev_new(const struct dso_profile *prof)
        struct dev_context *devc;
        int i;
 
-       sdi = sr_dev_inst_new(0, SR_ST_INITIALIZING,
+       sdi = sr_dev_inst_new(SR_ST_INITIALIZING,
                prof->vendor, prof->model, NULL);
        if (!sdi)
                return NULL;
@@ -342,7 +342,6 @@ static GSList *scan(GSList *options)
                                sdi->connection_id = g_strdup(connection_id);
                                sdi->status = SR_ST_INACTIVE;
                                devices = g_slist_append(devices, sdi);
-                               devc = sdi->priv;
                                sdi->inst_type = SR_INST_USB;
                                sdi->conn = sr_usb_dev_inst_new(
                                                libusb_get_bus_number(devlist[i]),
@@ -670,6 +669,7 @@ static void send_chunk(struct sr_dev_inst *sdi, unsigned char *buf,
        analog.num_samples = num_samples;
        analog.mq = SR_MQ_VOLTAGE;
        analog.unit = SR_UNIT_VOLT;
+       analog.mqflags = 0;
        /* TODO: Check malloc return value. */
        analog.data = g_try_malloc(analog.num_samples * sizeof(float) * num_channels);
        data_offset = 0;