#include "protocol.h"
-/* parser.c */
-SR_PRIV int sr_brymen_parse(const uint8_t *buf, float *floatval,
- struct sr_datafeed_analog *analog, void *info);
-
static void handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi)
{
float floatval;
analog.num_samples = 1;
analog.mq = -1;
- sr_brymen_parse(buf, &floatval, &analog, NULL);
+ if (brymen_parse(buf, &floatval, &analog, NULL) != SR_OK)
+ return;
analog.data = &floatval;
- analog.probes = sdi->probes;
+ analog.channels = sdi->channels;
if (analog.mq != -1) {
/* Got a measurement. */