]> sigrok.org Git - libsigrok.git/commitdiff
colead-slm: Properly check acquisition sample limit.
authorBert Vermeulen <redacted>
Tue, 23 Sep 2014 20:27:34 +0000 (22:27 +0200)
committerBert Vermeulen <redacted>
Tue, 23 Sep 2014 20:27:34 +0000 (22:27 +0200)
src/hardware/colead-slm/protocol.c

index 4abcdd5e43dc336814fa4f70862713aa6744a59f..ef58ab73c484ae8c02340060e946a9f1e9483df8 100644 (file)
@@ -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);
 
 }