]> sigrok.org Git - libsigrok.git/blobdiff - hardware/demo/demo.c
Get rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.
[libsigrok.git] / hardware / demo / demo.c
index 7238d84e04e6518a402a929fd43993a80c181afe..5d7c006aab3ae1843234fc62f19d7c304aadade0 100644 (file)
@@ -235,12 +235,6 @@ static int hw_info_get(int info_id, const void **data,
        case SR_DI_HWCAPS:
                *data = hwcaps;
                break;
-       case SR_DI_NUM_PROBES:
-               *data = GINT_TO_POINTER(NUM_PROBES);
-               break;
-       case SR_DI_PROBE_NAMES:
-               *data = probe_names;
-               break;
        case SR_DI_SAMPLERATES:
                *data = &samplerates;
                break;
@@ -382,11 +376,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;
        }