]> sigrok.org Git - libsigrok.git/commitdiff
agilent-dmm: fix AC/DC mode detection
authorBert Vermeulen <redacted>
Sun, 9 Sep 2012 20:49:07 +0000 (22:49 +0200)
committerBert Vermeulen <redacted>
Sun, 9 Sep 2012 20:49:07 +0000 (22:49 +0200)
hardware/agilent-dmm/sched.c

index 68880660c02c2ed41df7126c9b7e8231a1c3741d..9f9174f3fb2cd3aaee7337f864d0ab8c48854cd4 100644 (file)
@@ -324,8 +324,8 @@ SR_PRIV int agdmm_conf_recv(const struct sr_dev_inst *sdi, GMatchInfo *match)
                sr_dbg("agilent-dmm: unknown first argument");
        g_free(mstr);
 
-       if (g_match_info_get_match_count(match) == 3) {
-               mstr = g_match_info_fetch(match, 1);
+       if (g_match_info_get_match_count(match) == 4) {
+               mstr = g_match_info_fetch(match, 3);
                /* Third value, if present, is always AC or DC. */
                if (!strcmp(mstr, "AC"))
                        devc->cur_mqflags |= SR_MQFLAG_AC;