- if (devc->cur_acq_frame == devc->frame_limit - 1) {
- /* All frames acquired. */
- sr_spew("All frames acquired.");
- sdi->driver->dev_acquisition_stop(sdi);
- return TRUE;
- } else {
- /* Start acquiring next frame. */
- if (devc->df_started) {
- packet.type = SR_DF_FRAME_END;
- sr_session_send(sdi, &packet);
-
- packet.type = SR_DF_FRAME_BEGIN;
- sr_session_send(sdi, &packet);
- }
- devc->cur_acq_frame++;
- devc->state = START_ACQUISITION;
- }
- } else {
- /* Start acquiring next channel. */
- devc->state = START_TRANSFER_OF_CHANNEL_DATA;
- devc->cur_acq_channel++;
+ /* All channels acquired. */
+ if (devc->cur_acq_channel == ANALOG_CHANNELS - 1) {
+ sr_spew("All channels acquired.");
+
+ if (devc->cur_acq_frame == devc->frame_limit - 1) {
+ /* All frames acquired. */
+ sr_spew("All frames acquired.");
+ sr_dev_acquisition_stop(sdi);