colead-slm: Properly check acquisition sample limit.
This commit is contained in:
parent
79f92686c6
commit
9a10ce65d6
|
@ -173,6 +173,9 @@ static void process_packet(const struct sr_dev_inst *sdi)
|
||||||
sr_session_send(devc->cb_data, &packet);
|
sr_session_send(devc->cb_data, &packet);
|
||||||
|
|
||||||
devc->num_samples++;
|
devc->num_samples++;
|
||||||
|
if (devc->num_samples >= devc->limit_samples)
|
||||||
|
sdi->driver->dev_acquisition_stop((struct sr_dev_inst *)sdi,
|
||||||
|
devc->cb_data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue