From 2b98e0aaab7e83c30fb1f690318584aa0f85b50a Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Mon, 15 Oct 2012 11:32:36 +0200 Subject: [PATCH] analog: support AC+DC unit modifier --- output/analog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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");