Fix handling second channel on DS2000 series.
Patch from Mathias Grimmberger.
This commit is contained in:
parent
6ff1394ed1
commit
355de5a110
|
@ -750,6 +750,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
|
||||||
devc->num_frame_bytes = 0;
|
devc->num_frame_bytes = 0;
|
||||||
} else {
|
} else {
|
||||||
if (devc->enabled_analog_probes) {
|
if (devc->enabled_analog_probes) {
|
||||||
|
devc->channel_frame = devc->enabled_analog_probes->data;
|
||||||
/* Assume there already was a trigger event - don't wait */
|
/* Assume there already was a trigger event - don't wait */
|
||||||
if (rigol_ds2xx2_acquisition_start(sdi, FALSE) != SR_OK)
|
if (rigol_ds2xx2_acquisition_start(sdi, FALSE) != SR_OK)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
|
@ -169,8 +169,6 @@ SR_PRIV int rigol_ds2xx2_acquisition_start(const struct sr_dev_inst *sdi,
|
||||||
if (!(devc = sdi->priv))
|
if (!(devc = sdi->priv))
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
||||||
devc->channel_frame = devc->enabled_analog_probes->data;
|
|
||||||
|
|
||||||
sr_dbg("Starting acquisition on channel %d",
|
sr_dbg("Starting acquisition on channel %d",
|
||||||
devc->channel_frame->index + 1);
|
devc->channel_frame->index + 1);
|
||||||
|
|
||||||
|
@ -366,11 +364,11 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
|
||||||
&& devc->enabled_analog_probes->next != NULL) {
|
&& devc->enabled_analog_probes->next != NULL) {
|
||||||
/* We got the frame for the first analog channel, but
|
/* We got the frame for the first analog channel, but
|
||||||
* there's a second analog channel. */
|
* there's a second analog channel. */
|
||||||
|
devc->channel_frame = devc->enabled_analog_probes->next->data;
|
||||||
if (devc->model->series == 2) {
|
if (devc->model->series == 2) {
|
||||||
/* Do not wait for trigger to try and keep channel data related. */
|
/* Do not wait for trigger to try and keep channel data related. */
|
||||||
rigol_ds2xx2_acquisition_start(sdi, FALSE);
|
rigol_ds2xx2_acquisition_start(sdi, FALSE);
|
||||||
} else {
|
} else {
|
||||||
devc->channel_frame = devc->enabled_analog_probes->next->data;
|
|
||||||
rigol_ds_send(sdi, ":WAV:DATA? CHAN%c",
|
rigol_ds_send(sdi, ":WAV:DATA? CHAN%c",
|
||||||
devc->channel_frame->name[2]);
|
devc->channel_frame->name[2]);
|
||||||
}
|
}
|
||||||
|
@ -390,6 +388,7 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
|
||||||
/* Get the next frame, starting with the first analog channel. */
|
/* Get the next frame, starting with the first analog channel. */
|
||||||
if (devc->model->series == 2) {
|
if (devc->model->series == 2) {
|
||||||
if (devc->enabled_analog_probes) {
|
if (devc->enabled_analog_probes) {
|
||||||
|
devc->channel_frame = devc->enabled_analog_probes->data;
|
||||||
/* Must wait for trigger because at
|
/* Must wait for trigger because at
|
||||||
* slow timebases the scope will
|
* slow timebases the scope will
|
||||||
* return old data otherwise. */
|
* return old data otherwise. */
|
||||||
|
|
Loading…
Reference in New Issue