X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ffx2lafw%2Ffx2lafw.c;h=0f839b57ca6f228d2a550a93c013da6656514914;hb=f366e86c68071fa7888259aa3963b213caa81b51;hp=0ea4030d7b1fcffb2f81f191275f43fa3a17fab8;hpb=ee7489d23449a3f5a81777fbdb3309dfe22bcecd;p=libsigrok.git diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 0ea4030d..0f839b57 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -794,6 +794,7 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data) struct sr_dev_inst *sdi; struct sr_datafeed_packet *packet; struct sr_datafeed_header *header; + struct sr_datafeed_meta_logic meta; struct context *ctx; struct libusb_transfer *transfer; const struct libusb_pollfd **lupfd; @@ -848,9 +849,15 @@ static int hw_dev_acquisition_start(int dev_index, void *cb_data) packet->payload = header; header->feed_version = 1; gettimeofday(&header->starttime, NULL); - header->samplerate = ctx->cur_samplerate; - header->num_logic_probes = ctx->profile->num_probes; sr_session_send(cb_data, packet); + + /* Send metadata about the SR_DF_LOGIC packets to come. */ + packet->type = SR_DF_META_LOGIC; + packet->payload = &meta; + meta.samplerate = ctx->cur_samplerate; + meta.num_probes = ctx->profile->num_probes; + sr_session_send(cb_data, packet); + g_free(header); g_free(packet);