X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fdemo%2Fdemo.c;h=b02e668c01b020327a08b024c30c3e9fe4b81f94;hb=512bb890df8363e800025b3b63ebac429c139aa0;hp=aac585a2f3212311372ab617d8bd0dc409a3a194;hpb=a873c5940cc6d2d8f54f2dfdac3a98c4a3d302ee;p=libsigrok.git diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index aac585a2..b02e668c 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -111,14 +111,7 @@ static const char *pattern_strings[] = { /* We name the probes 0-7 on our demo driver. */ static const char *probe_names[NUM_PROBES + 1] = { - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", + "0", "1", "2", "3", "4", "5", "6", "7", NULL, }; @@ -389,11 +382,8 @@ static int receive_data(int fd, int revents, void *cb_data) devc->samples_counter += sending_now; } - - if (devc->samples_counter >= limit_samples) { - sr_spew("We sent a total of %" PRIu64 " samples.", - devc->samples_counter); - /* Make sure we don't receive more packets. */ + if (limit_samples && devc->samples_counter >= limit_samples) { + sr_info("Requested number of samples reached."); hw_dev_acquisition_stop(NULL, cb_data); return TRUE; }