]> sigrok.org Git - libsigrok.git/blobdiff - hardware/brymen-dmm/protocol.c
Replace 'probe' with 'channel' in most places.
[libsigrok.git] / hardware / brymen-dmm / protocol.c
index 230b60d38cce655c872d0a97c772ed01052f4bf9..664258aa72f53fb3cc06799176d51b5eb12e24a6 100644 (file)
 
 #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;
@@ -35,10 +31,11 @@ static void handle_packet(const uint8_t *buf, struct sr_dev_inst *sdi)
        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. */