beaglelogic: Fix regression in continuous sampling

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
This commit is contained in:
Kumar Abhishek 2017-09-23 18:19:13 +05:30 committed by Uwe Hermann
parent 3124d3bc48
commit ca0d1a21af
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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;