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.
This commit is contained in:
Uwe Hermann 2013-12-29 14:17:10 +01:00
parent 87b545fba4
commit 683fd16137
1 changed files with 1 additions and 1 deletions

View 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);