From: Bert Vermeulen Date: Tue, 23 Sep 2014 20:27:34 +0000 (+0200) Subject: colead-slm: Properly check acquisition sample limit. X-Git-Tag: libsigrok-0.4.0~990 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9a10ce65d62526a24cbca2ee9e1cf55e132d6f7a;p=libsigrok.git colead-slm: Properly check acquisition sample limit. --- diff --git a/src/hardware/colead-slm/protocol.c b/src/hardware/colead-slm/protocol.c index 4abcdd5e..ef58ab73 100644 --- a/src/hardware/colead-slm/protocol.c +++ b/src/hardware/colead-slm/protocol.c @@ -173,6 +173,9 @@ static void process_packet(const struct sr_dev_inst *sdi) sr_session_send(devc->cb_data, &packet); devc->num_samples++; + if (devc->num_samples >= devc->limit_samples) + sdi->driver->dev_acquisition_stop((struct sr_dev_inst *)sdi, + devc->cb_data); }