]> sigrok.org Git - libsigrok.git/blobdiff - src/hwdriver.c
Change type of SR_CONF_CONTINUOUS from SR_T_UINT64 to SR_T_BOOL
[libsigrok.git] / src / hwdriver.c
index b31242ad7799dec7aef83d974bce5372b16f7e2b..0c668e059e36dc4be51598fccc5fec0f9a9cc987 100644 (file)
@@ -199,7 +199,7 @@ static struct sr_key_info sr_key_info_config[] = {
                "Sample limit", NULL},
        {SR_CONF_LIMIT_FRAMES, SR_T_UINT64, "limit_frames",
                "Frame limit", NULL},
-       {SR_CONF_CONTINUOUS, SR_T_UINT64, "continuous",
+       {SR_CONF_CONTINUOUS, SR_T_BOOL, "continuous",
                "Continuous sampling", NULL},
        {SR_CONF_DATALOG, SR_T_BOOL, "datalog",
                "Datalog", NULL},
@@ -278,6 +278,7 @@ static struct sr_key_info sr_key_info_mqflag[] = {
        {SR_MQFLAG_AVG, 0, "average", "Average", NULL},
        {SR_MQFLAG_REFERENCE, 0, "reference", "Reference", NULL},
        {SR_MQFLAG_UNSTABLE, 0, "unstable", "Unstable", NULL},
+       {SR_MQFLAG_FOUR_WIRE, 0, "four_wire", "4-Wire", NULL},
        ALL_ZERO
 };
 
@@ -586,6 +587,7 @@ static void log_key(const struct sr_dev_inst *sdi,
 {
        const char *opstr;
        const struct sr_key_info *srci;
+       gchar *tmp_str;
 
        /* Don't log SR_CONF_DEVICE_OPTIONS, it's verbose and not too useful. */
        if (key == SR_CONF_DEVICE_OPTIONS)
@@ -594,9 +596,11 @@ static void log_key(const struct sr_dev_inst *sdi,
        opstr = op == SR_CONF_GET ? "get" : op == SR_CONF_SET ? "set" : "list";
        srci = sr_key_info_get(SR_KEY_CONFIG, key);
 
+       tmp_str = g_variant_print(data, TRUE);
        sr_spew("sr_config_%s(): key %d (%s) sdi %p cg %s -> %s", opstr, key,
                srci ? srci->id : "NULL", sdi, cg ? cg->name : "NULL",
-               data ? g_variant_print(data, TRUE) : "NULL");
+               data ? tmp_str : "NULL");
+       g_free(tmp_str);
 }
 
 static int check_key(const struct sr_dev_driver *driver,