]> sigrok.org Git - libsigrok.git/commitdiff
analog: support AC+DC unit modifier
authorBert Vermeulen <redacted>
Mon, 15 Oct 2012 09:32:36 +0000 (11:32 +0200)
committerBert Vermeulen <redacted>
Mon, 15 Oct 2012 09:32:36 +0000 (11:32 +0200)
output/analog.c

index d87e22f1afcd4740d6b3f7ae91aac9679c37a999..daab86a7fbd655c1419492908253140a7e628e70 100644 (file)
@@ -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");