]> sigrok.org Git - libsigrok.git/commitdiff
OLS: fix multi-channel capture
authorBert Vermeulen <redacted>
Wed, 11 Aug 2010 16:37:09 +0000 (18:37 +0200)
committerBert Vermeulen <redacted>
Wed, 11 Aug 2010 16:37:09 +0000 (18:37 +0200)
hardware/openbench-logic-sniffer/ols.c

index c793088f2b0d8ed4427ddb4ae787f7aa20fac66f..a103e8fc1f50528cf07f2f56e19459603b84b13b 100644 (file)
@@ -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)