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