]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw: Fix incorrect unitsize when a trigger fires.
authorUwe Hermann <redacted>
Sun, 29 Dec 2013 13:17:10 +0000 (14:17 +0100)
committerUwe Hermann <redacted>
Sun, 29 Dec 2013 13:18:51 +0000 (14:18 +0100)
The unitsize was always being set to 2, regardless of whether an fx2lafw
device with 8 or 16 probes was used.

This fixes bug #182.

hardware/fx2lafw/protocol.c

index 62be7f6d36e08ae2cf3f28bbee80a1f2e35baae3..1ea9020958c4dabc6f0ca08e2e6013d00d6d63c4 100644 (file)
@@ -516,7 +516,7 @@ SR_PRIV void fx2lafw_receive_transfer(struct libusb_transfer *transfer)
                                         */
                                        packet.type = SR_DF_LOGIC;
                                        packet.payload = &logic;
-                                       logic.unitsize = sizeof(*devc->trigger_buffer);
+                                       logic.unitsize = sample_width;
                                        logic.length = devc->trigger_stage * logic.unitsize;
                                        logic.data = devc->trigger_buffer;
                                        sr_session_send(devc->cb_data, &packet);