From: Uwe Hermann Date: Fri, 28 Aug 2015 12:14:10 +0000 (+0200) Subject: output/analog: Fix key order, add missing items. X-Git-Tag: libsigrok-0.4.0~380 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c984f2f997ab2c5fdeef72d131e04a92619f89fd;p=libsigrok.git output/analog: Fix key order, add missing items. --- diff --git a/src/output/analog.c b/src/output/analog.c index d10f2e94..82e7ad9c 100644 --- a/src/output/analog.c +++ b/src/output/analog.c @@ -111,9 +111,6 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) case SR_UNIT_FARAD: si_printf(value, out, "F"); break; - case SR_UNIT_HENRY: - si_printf(value, out, "H"); - break; case SR_UNIT_KELVIN: si_printf(value, out, "K"); break; @@ -151,6 +148,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) case SR_UNIT_DECIBEL_VOLT: si_printf(value, out, "dBV"); break; + case SR_UNIT_UNITLESS: + si_printf(value, out, ""); + break; case SR_UNIT_DECIBEL_SPL: if (mqflags & SR_MQFLAG_SPL_FREQ_WEIGHT_A) si_printf(value, out, "dB(A)"); @@ -200,6 +200,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) si_printf(value, out, ""); g_string_append_unichar(out, 0x00b0); break; + case SR_UNIT_HENRY: + si_printf(value, out, "H"); + break; case SR_UNIT_GRAM: si_printf(value, out, "g"); break; @@ -256,6 +259,9 @@ static void fancyprint(int unit, int mqflags, float value, GString *out) g_string_append_printf(out, " AUTO"); if (mqflags & SR_MQFLAG_RELATIVE) g_string_append_printf(out, " REL"); + /* Note: SR_MQFLAG_SPL_* is handled above. */ + if (mqflags & SR_MQFLAG_DURATION) + g_string_append_printf(out, " DURATION"); if (mqflags & SR_MQFLAG_AVG) g_string_append_printf(out, " AVG"); if (mqflags & SR_MQFLAG_REFERENCE)