sr: add support for conductance measurements in Siemens
This commit is contained in:
parent
aa839a5c4f
commit
96b3b3d568
|
@ -147,6 +147,7 @@ enum {
|
||||||
SR_MQ_DUTY_CYCLE,
|
SR_MQ_DUTY_CYCLE,
|
||||||
SR_MQ_CONTINUITY,
|
SR_MQ_CONTINUITY,
|
||||||
SR_MQ_PULSE_WIDTH,
|
SR_MQ_PULSE_WIDTH,
|
||||||
|
SR_MQ_CONDUCTANCE,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* sr_datafeed_analog.unit values */
|
/* sr_datafeed_analog.unit values */
|
||||||
|
@ -162,6 +163,7 @@ enum {
|
||||||
SR_UNIT_PERCENTAGE,
|
SR_UNIT_PERCENTAGE,
|
||||||
SR_UNIT_BOOLEAN,
|
SR_UNIT_BOOLEAN,
|
||||||
SR_UNIT_SECOND,
|
SR_UNIT_SECOND,
|
||||||
|
SR_UNIT_SIEMENS,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** sr_datafeed_analog.flags values */
|
/** sr_datafeed_analog.flags values */
|
||||||
|
|
|
@ -128,6 +128,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out)
|
||||||
case SR_UNIT_SECOND:
|
case SR_UNIT_SECOND:
|
||||||
si_printf(value, out, "s");
|
si_printf(value, out, "s");
|
||||||
break;
|
break;
|
||||||
|
case SR_UNIT_SIEMENS:
|
||||||
|
si_printf(value, out, "S");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (mqflags & SR_MQFLAG_AC)
|
if (mqflags & SR_MQFLAG_AC)
|
||||||
g_string_append_printf(out, " AC");
|
g_string_append_printf(out, " AC");
|
||||||
|
|
Loading…
Reference in New Issue