X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdmm%2Fut372.c;h=74f8757555c15abbe5a2d55ba2886950d7a419b6;hb=b89462e45706e9b4f65eced96c7d76347f4b5569;hp=d9c7720fd16bce17323271ef0c25554c7caa4131;hpb=6df8e239de62694b30a3bb061e421ea12363c185;p=libsigrok.git diff --git a/src/dmm/ut372.c b/src/dmm/ut372.c index d9c7720f..74f87575 100644 --- a/src/dmm/ut372.c +++ b/src/dmm/ut372.c @@ -22,10 +22,11 @@ * UNI-T UT372 protocol parser. */ +#include #include #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #define LOG_PREFIX "ut372" @@ -87,7 +88,7 @@ SR_PRIV gboolean sr_ut372_packet_valid(const uint8_t *buf) } SR_PRIV int sr_ut372_parse(const uint8_t *buf, float *floatval, - struct sr_datafeed_analog *analog, void *info) + struct sr_datafeed_analog_old *analog, void *info) { unsigned int i, j, value, divisor; uint8_t segments, flags1, flags2; @@ -118,7 +119,7 @@ SR_PRIV int sr_ut372_parse(const uint8_t *buf, float *floatval, divisor = 1; for (i = 0; i < 5; i++) { - segments = decode_pair(buf + 1 + 2*i); + segments = decode_pair(buf + 1 + (2 * i)); for (j = 0; j < ARRAY_SIZE(lookup); j++) { if (lookup[j] == (segments & ~DECIMAL_POINT_MASK)) { value += j * pow(10, i);