X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fapi.c;h=ea6d59ccb26c7fc60b55772a99ee9b940686c2be;hb=6fad08e6abfa4e5ee708f584e530c6b611a65cdb;hp=3ad928bdd79ac05e2a1d28baf91043b812f92c6f;hpb=395206f460cc4002feedca2265cf374b90c9c047;p=libsigrok.git diff --git a/src/hardware/hantek-dso/api.c b/src/hardware/hantek-dso/api.c index 3ad928bd..ea6d59cc 100644 --- a/src/hardware/hantek-dso/api.c +++ b/src/hardware/hantek-dso/api.c @@ -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;