return SR_ERR;
if (analog.num_samples == 0) {
+ g_free(analog.data);
+
/* No data available, we have to acquire data first. */
g_snprintf(command, sizeof(command), "ARM;WAIT;*OPC;C%d:WAVEFORM?", ch->index + 1);
sr_scpi_send(sdi->conn, command);
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);
}