]> sigrok.org Git - libsigrok.git/commitdiff
zeroplus-logic-cube: Only emit log message upon unexpected number of bytes.
authorUwe Hermann <redacted>
Sat, 6 Oct 2018 15:14:24 +0000 (17:14 +0200)
committerUwe Hermann <redacted>
Sat, 6 Oct 2018 17:13:39 +0000 (19:13 +0200)
src/hardware/zeroplus-logic-cube/api.c

index 4ebe152f151ab075b4f53fc0276d50836d6e6b98..7a4041a16143f7d6dc84d7b35af3d4e224692a8f 100644 (file)
@@ -547,8 +547,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                unsigned int buf_offset;
 
                res = analyzer_read_data(usb->devhdl, buf, PACKET_SIZE);
-               sr_info("Tried to read %d bytes, actually read %d bytes.",
-                       PACKET_SIZE, res);
+               if (res != PACKET_SIZE)
+                       sr_warn("Tried to read %d bytes, actually read %d.",
+                               PACKET_SIZE, res);
 
                if (discard >= PACKET_SIZE / 4) {
                        discard -= PACKET_SIZE / 4;