X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fdmm%2Fvc870.c;h=ac04e640c4148d00781d587084c3b2c8e43dfc02;hb=877a6d09d54d48814e8cf27a67eab0756136f2ae;hp=0c1de7853668effebf5504a9d4acede6c6efba8f;hpb=c35276dd92b948d0c8c71bd816a8a75453895e81;p=libsigrok.git diff --git a/src/dmm/vc870.c b/src/dmm/vc870.c index 0c1de785..ac04e640 100644 --- a/src/dmm/vc870.c +++ b/src/dmm/vc870.c @@ -18,11 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #define LOG_PREFIX "vc870" @@ -70,8 +71,9 @@ static int parse_value(const uint8_t *buf, struct vc870_info *info, } else if (!isdigit(buf[3]) || !isdigit(buf[4]) || !isdigit(buf[5]) || !isdigit(buf[6]) || !isdigit(buf[7])) { sr_dbg("Invalid digits: %02x %02x %02x %02x %02X " - "(%c %c %c %c %c).", buf[3], buf[4], buf[5], buf[6], - buf[7]); + "(%c %c %c %c %c).", + buf[3], buf[4], buf[5], buf[6], buf[7], + buf[3], buf[4], buf[5], buf[6], buf[7]); return SR_ERR; } @@ -278,7 +280,7 @@ static void parse_flags(const uint8_t *buf, struct vc870_info *info) info->is_rms = TRUE; } -static void handle_flags(struct sr_datafeed_analog *analog, +static void handle_flags(struct sr_datafeed_analog_old *analog, float *floatval, const struct vc870_info *info) { /* @@ -400,13 +402,11 @@ SR_PRIV gboolean sr_vc870_packet_valid(const uint8_t *buf) } SR_PRIV int sr_vc870_parse(const uint8_t *buf, float *floatval, - struct sr_datafeed_analog *analog, void *info) + struct sr_datafeed_analog_old *analog, void *info) { int ret; struct vc870_info *info_local; - info_local = (struct vc870_info *)info; - info_local = (struct vc870_info *)info; memset(info_local, 0, sizeof(struct vc870_info));