From: Uwe Hermann Date: Mon, 2 Mar 2015 11:23:32 +0000 (+0100) Subject: ut372: Minor cosmetics. X-Git-Tag: libsigrok-0.4.0~611 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6df8e239de62694b30a3bb061e421ea12363c185;p=libsigrok.git ut372: Minor cosmetics. --- diff --git a/src/dmm/ut372.c b/src/dmm/ut372.c index 2de8eec9..d9c7720f 100644 --- a/src/dmm/ut372.c +++ b/src/dmm/ut372.c @@ -30,7 +30,7 @@ #define LOG_PREFIX "ut372" -uint8_t lookup[] = { +static const uint8_t lookup[] = { 0x7B, 0x60, 0x5E, @@ -40,7 +40,7 @@ uint8_t lookup[] = { 0x3F, 0x70, 0x7F, - 0x7D + 0x7D, }; #define DECIMAL_POINT_MASK 0x80 @@ -51,7 +51,7 @@ uint8_t lookup[] = { #define FLAGS2_COUNT_MASK (1 << 1) #define FLAGS2_MAX_MASK (1 << 4) #define FLAGS2_MIN_MASK (1 << 5) -#define FLAGS2_AVE_MASK (1 << 6) +#define FLAGS2_AVG_MASK (1 << 6) /* Decode a pair of characters into a byte. */ static uint8_t decode_pair(const uint8_t *buf) @@ -111,7 +111,7 @@ SR_PRIV int sr_ut372_parse(const uint8_t *buf, float *floatval, analog->mqflags |= SR_MQFLAG_MIN; if (flags2 & FLAGS2_MAX_MASK) analog->mqflags |= SR_MQFLAG_MAX; - if (flags2 & FLAGS2_AVE_MASK) + if (flags2 & FLAGS2_AVG_MASK) analog->mqflags |= SR_MQFLAG_AVG; value = 0;