sr: add support for conductance measurements in Siemens

This commit is contained in:
Bert Vermeulen 2012-09-25 19:34:53 +02:00
parent aa839a5c4f
commit 96b3b3d568
2 changed files with 5 additions and 0 deletions

View 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 */

View 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");