add support for AVG mqflag

This commit is contained in:
Aurelien Jacobs 2013-12-12 00:18:00 +01:00 committed by Bert Vermeulen
parent 61c39f54bb
commit f5027ca481
2 changed files with 4 additions and 0 deletions

View File

@ -299,6 +299,8 @@ enum {
SR_MQFLAG_SPL_PCT_OVER_ALARM = 0x10000,
/** Time is duration (as opposed to epoch, ...). */
SR_MQFLAG_DURATION = 0x20000,
/** Device is in "avg" mode, averaging upon each new value. */
SR_MQFLAG_AVG = 0x40000,
};
/** sigrok context (opaque). @see sr_init(), sr_exit(). */

View File

@ -208,6 +208,8 @@ 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");
if (mqflags & SR_MQFLAG_AVG)
g_string_append_printf(out, " AVG");
g_string_append_c(out, '\n');
}