]> sigrok.org Git - sigrok-cli.git/blobdiff - sigrok-cli.c
CLI: print sample numbers on annotations on log level > 2
[sigrok-cli.git] / sigrok-cli.c
index ce504b743a0a70f8f6e9ae230ad55c70c9c304c1..7354ca848824bc4759b3241ca5670aa20b54df44 100644 (file)
@@ -444,8 +444,8 @@ static void datafeed_in(struct sr_device *device, struct sr_datafeed_packet *pac
                goto cleanup;
 
        if (opt_pds) {
-               if (srd_session_feed(packet->timeoffset, packet->duration,
-                               (uint8_t*)filter_out, filter_out_len) != SRD_OK)
+               if (srd_session_feed(received_samples, (uint8_t*)filter_out,
+                               filter_out_len) != SRD_OK)
                        abort();
        } else {
                output_len = 0;
@@ -535,6 +535,8 @@ void show_pd_annotation(struct srd_proto_data *pdata)
                return;
        }
 
+       if (opt_loglevel > SR_LOG_WARN)
+               printf("%"PRIu64"-%"PRIu64" ", pdata->start_sample, pdata->end_sample);
        printf("%s: ", pdata->pdo->proto_id);
        for (i = 0; annotations[i]; i++)
                printf("\"%s\" ", annotations[i]);