Commit ca0d1a21 authored by Kumar Abhishek's avatar Kumar Abhishek Committed by Uwe Hermann

beaglelogic: Fix regression in continuous sampling

Signed-off-by: default avatarKumar Abhishek <abhishek@theembeddedkitchen.net>
parent 3124d3bc
......@@ -341,6 +341,11 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
}
devc->beaglelogic->set_sampleunit(devc);
/* If continuous sampling, set the limit_samples to max possible value */
if (devc->triggerflags == BL_TRIGGERFLAGS_CONTINUOUS) {
devc->limit_samples = (uint64_t)-1;
}
/* Configure triggers & send header packet */
if ((trigger = sr_session_trigger_get(sdi->session))) {
int pre_trigger_samples = 0;
......
......@@ -99,7 +99,7 @@ SR_PRIV int beaglelogic_native_receive_data(int fd, int revents, void *cb_data)
if ((devc->offset += packetsize) >= devc->buffersize) {
/* One shot capture, we abort and settle with less than
* the required number of samples */
if (devc->triggerflags)
if (devc->triggerflags == BL_TRIGGERFLAGS_CONTINUOUS)
devc->offset = 0;
else
packetsize = 0;
......@@ -181,7 +181,7 @@ SR_PRIV int beaglelogic_tcp_receive_data(int fd, int revents, void *cb_data)
if ((devc->offset += packetsize) >= devc->buffersize) {
/* One shot capture, we abort and settle with less than
* the required number of samples */
if (devc->triggerflags)
if (devc->triggerflags == BL_TRIGGERFLAGS_CONTINUOUS)
devc->offset = 0;
else
packetsize = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment