From: v1ne Date: Tue, 23 Feb 2021 21:36:33 +0000 (+0100) Subject: ols: Fix demuxer operation X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a66d5595975e0c73a46df772552c20c86c32e8a9;p=libsigrok.git ols: Fix demuxer operation On my OLS with Demon Core (v3.07), the following command produces only low levels on channels 8-15: sigrok-cli -d ols:conn=/dev/ttyACM0 --output-format ascii:width=128 \ --config='samplerate=200M:pattern=Internal:captureratio=50' \ --channels 0-15 --samples 32 --triggers "12=1" This doesn't make sense since it only triggers if channel 12 is high. By not overwriting the channel data, I get the desired output. The data is processed in groups of 2 bytes, so there's no need to fold back "input" from devc->sample[2..3] because these bytes are always zero. --- diff --git a/src/hardware/openbench-logic-sniffer/protocol.c b/src/hardware/openbench-logic-sniffer/protocol.c index bf065c76..68022a1c 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.c +++ b/src/hardware/openbench-logic-sniffer/protocol.c @@ -487,12 +487,6 @@ SR_PRIV int ols_receive_data(int fd, int revents, void *cb_data) */ tmp_sample[i] = devc->sample[j++]; - } else if (devc->capture_flags & - CAPTURE_FLAG_DEMUX && - (i > 2)) { - /* group 2 & 3 get added to 0 & 1 */ - tmp_sample[i - 2] = - devc->sample[j++]; } } memcpy(devc->sample, tmp_sample, 4);