From: Bert Vermeulen Date: Wed, 11 Aug 2010 16:37:09 +0000 (+0200) Subject: OLS: fix multi-channel capture X-Git-Tag: libsigrok-0.1.0~485 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f0d1b53e56045bc15fe156c3f6e855dfc91037be;p=libsigrok.git OLS: fix multi-channel capture --- diff --git a/hardware/openbench-logic-sniffer/ols.c b/hardware/openbench-logic-sniffer/ols.c index c793088f..a103e8fc 100644 --- a/hardware/openbench-logic-sniffer/ols.c +++ b/hardware/openbench-logic-sniffer/ols.c @@ -586,7 +586,7 @@ static int receive_data(int fd, int revents, void *user_data) * store it in reverse order here, so we can dump * this on the session bus later. */ - offset = (limit_samples - num_transfers) * 4; + offset = (limit_samples - num_transfers / num_channels) * 4; memcpy(raw_sample_buf + offset, sample, 4); if (buffer == sample)