From 96b3b3d56834f7c07a4760cfa3444b516c819de3 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Tue, 25 Sep 2012 19:34:53 +0200 Subject: [PATCH] sr: add support for conductance measurements in Siemens --- libsigrok.h | 2 ++ output/analog.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/libsigrok.h b/libsigrok.h index 5aacf2a6..595f1917 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -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 */ diff --git a/output/analog.c b/output/analog.c index 7c1b1007..d87e22f1 100644 --- a/output/analog.c +++ b/output/analog.c @@ -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");