From: Aurelien Jacobs Date: Wed, 11 Dec 2013 23:18:00 +0000 (+0100) Subject: add support for AVG mqflag X-Git-Tag: libsigrok-0.3.0~414 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f5027ca481d91fc92ec878d2eec2b6b446d3b7de;p=libsigrok.git add support for AVG mqflag --- diff --git a/libsigrok.h b/libsigrok.h index 2fef9507..f546183e 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -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(). */ diff --git a/output/analog.c b/output/analog.c index 06da3a87..58341e13 100644 --- a/output/analog.c +++ b/output/analog.c @@ -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'); }