]> sigrok.org Git - libsigrok.git/commitdiff
sr: add support for conductance measurements in Siemens
authorBert Vermeulen <redacted>
Tue, 25 Sep 2012 17:34:53 +0000 (19:34 +0200)
committerBert Vermeulen <redacted>
Tue, 25 Sep 2012 17:53:05 +0000 (19:53 +0200)
libsigrok.h
output/analog.c

index 5aacf2a6395e4fe5620d80a30d4903162c065dc5..595f19171194db950a745465c2e2d4cb7f1f1f8b 100644 (file)
@@ -147,6 +147,7 @@ enum {
        SR_MQ_DUTY_CYCLE,
        SR_MQ_CONTINUITY,
        SR_MQ_PULSE_WIDTH,
+       SR_MQ_CONDUCTANCE,
 };
 
 /* sr_datafeed_analog.unit values */
@@ -162,6 +163,7 @@ enum {
        SR_UNIT_PERCENTAGE,
        SR_UNIT_BOOLEAN,
        SR_UNIT_SECOND,
+       SR_UNIT_SIEMENS,
 };
 
 /** sr_datafeed_analog.flags values */
index 7c1b1007b99f0d5d177bf0314e871c5d83e24cfa..d87e22f1afcd4740d6b3f7ae91aac9679c37a999 100644 (file)
@@ -128,6 +128,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out)
                case SR_UNIT_SECOND:
                        si_printf(value, out, "s");
                        break;
+               case SR_UNIT_SIEMENS:
+                       si_printf(value, out, "S");
+                       break;
        }
        if (mqflags & SR_MQFLAG_AC)
                g_string_append_printf(out, " AC");