From: Uwe Hermann Date: Fri, 30 Aug 2013 06:57:09 +0000 (+0200) Subject: output/analog: Support all known MQFLAGs. X-Git-Tag: libsigrok-0.2.2~70 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e6523173cff4b39e78566495786e43f0917c860f;p=libsigrok.git output/analog: Support all known MQFLAGs. --- diff --git a/output/analog.c b/output/analog.c index 684f8826..85def209 100644 --- a/output/analog.c +++ b/output/analog.c @@ -177,12 +177,25 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) si_printf(value, out, ""); break; } - if ((mqflags & (SR_MQFLAG_AC | SR_MQFLAG_DC)) == (SR_MQFLAG_AC | SR_MQFLAG_DC)) - g_string_append_printf(out, " AC+DC"); - else if (mqflags & SR_MQFLAG_AC) + + if (mqflags & SR_MQFLAG_AC) g_string_append_printf(out, " AC"); - else if (mqflags & SR_MQFLAG_DC) + if (mqflags & SR_MQFLAG_DC) g_string_append_printf(out, " DC"); + if (mqflags & SR_MQFLAG_RMS) + g_string_append_printf(out, " RMS"); + if (mqflags & SR_MQFLAG_DIODE) + g_string_append_printf(out, " DIODE"); + if (mqflags & SR_MQFLAG_HOLD) + g_string_append_printf(out, " HOLD"); + if (mqflags & SR_MQFLAG_MAX) + g_string_append_printf(out, " MAX"); + if (mqflags & SR_MQFLAG_MIN) + g_string_append_printf(out, " MIN"); + if (mqflags & SR_MQFLAG_AUTORANGE) + g_string_append_printf(out, " AUTO"); + if (mqflags & SR_MQFLAG_RELATIVE) + g_string_append_printf(out, " REL"); g_string_append_c(out, '\n'); }