]> sigrok.org Git - libsigrok.git/blobdiff - hardware/agilent-dmm/api.c
rigol-ds1xx2: Better error reporting when probe groups are required
[libsigrok.git] / hardware / agilent-dmm / api.c
index 34fa92ad507db894c1a96ad3558d170859404b57..e67f0e020a78db3ab3b2329eeeeae8481d549fb3 100644 (file)
@@ -129,7 +129,7 @@ static GSList *scan(GSList *options)
 
        tokens = g_strsplit(buf, ",", 4);
        if (!strcmp("Agilent Technologies", tokens[0])
-                       && tokens[2] && tokens[3]) {
+                       && tokens[1] && tokens[2] && tokens[3]) {
                for (i = 0; supported_agdmm[i].model; i++) {
                        if (strcmp(supported_agdmm[i].modelname, tokens[1]))
                                continue;
@@ -200,10 +200,13 @@ static int cleanup(void)
        return dev_clear();
 }
 
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
+static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct dev_context *devc;
 
+       (void)probe_group;
+
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
@@ -235,10 +238,11 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
-
        (void)sdi;
+       (void)probe_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS: