* number of frames, or continue reception by starting over at
* the first enabled channel.
*/
- if (++devc->num_frames == devc->frame_limit) {
+ devc->num_frames++;
+ if (devc->frame_limit && (devc->num_frames == devc->frame_limit)) {
sr_dev_acquisition_stop(sdi);
} else {
devc->current_channel = devc->enabled_channels;
+
+ /* Wait for trigger, then begin fetching data. */
+ g_snprintf(command, sizeof(command), "ARM;WAIT;*OPC");
+ sr_scpi_send(sdi->conn, command);
+
lecroy_xstream_request_data(sdi);
}