From: Uwe Hermann Date: Sun, 29 Dec 2013 13:17:10 +0000 (+0100) Subject: fx2lafw: Fix incorrect unitsize when a trigger fires. X-Git-Tag: libsigrok-0.3.0~370 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=683fd1613735d0e86c3b14c18b11d22492cee88a;p=libsigrok.git fx2lafw: Fix incorrect unitsize when a trigger fires. 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. --- diff --git a/hardware/fx2lafw/protocol.c b/hardware/fx2lafw/protocol.c index 62be7f6d..1ea90209 100644 --- a/hardware/fx2lafw/protocol.c +++ b/hardware/fx2lafw/protocol.c @@ -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);