analog: Add MQ Flag for four-wire measurements

On the high-end bench multimeters, resistance can be measured with a
kelvin connection as well as the more common two wire method. Provide
a flag which can indicate if four-wire mode is used.
This commit is contained in:
Alexandru Gagniuc 2016-04-03 18:04:42 -07:00 committed by Uwe Hermann
parent e2626373b7
commit 6d5cd3bd38
3 changed files with 5 additions and 0 deletions

View File

@ -383,6 +383,8 @@ enum sr_mqflag {
SR_MQFLAG_REFERENCE = 0x80000,
/** Unstable value (hasn't settled yet). */
SR_MQFLAG_UNSTABLE = 0x100000,
/** Measurement is four wire (e.g. Kelvin connection). */
SR_MQFLAG_FOUR_WIRE = 0x200000,
/*
* Update mq_strings[] (analog.c) and fancyprint() (output/analog.c)

View File

@ -114,6 +114,7 @@ static struct unit_mq_string mq_strings[] = {
{ SR_MQFLAG_AVG, " AVG" },
{ SR_MQFLAG_REFERENCE, " REF" },
{ SR_MQFLAG_UNSTABLE, " UNSTABLE" },
{ SR_MQFLAG_FOUR_WIRE, " 4-WIRE" },
ALL_ZERO
};

View File

@ -273,6 +273,8 @@ static void fancyprint(int unit, int mqflags, float value, GString *out)
g_string_append_printf(out, " REF");
if (mqflags & SR_MQFLAG_UNSTABLE)
g_string_append_printf(out, " UNSTABLE");
if (mqflags & SR_MQFLAG_FOUR_WIRE)
g_string_append_printf(out, " 4-WIRE");
g_string_append_c(out, '\n');
}