From: Bert Vermeulen Date: Mon, 15 Oct 2012 09:32:36 +0000 (+0200) Subject: analog: support AC+DC unit modifier X-Git-Tag: dsupstream~672 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2b98e0aaab7e83c30fb1f690318584aa0f85b50a;p=libsigrok.git analog: support AC+DC unit modifier --- diff --git a/output/analog.c b/output/analog.c index d87e22f1..daab86a7 100644 --- a/output/analog.c +++ b/output/analog.c @@ -132,7 +132,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) si_printf(value, out, "S"); break; } - if (mqflags & SR_MQFLAG_AC) + 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) g_string_append_printf(out, " AC"); else if (mqflags & SR_MQFLAG_DC) g_string_append_printf(out, " DC");