|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Timer-Chronometer |
Date: | Thu, 28 Sep 2017 07:13:54 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Hi Ali, You're getting into hand-waving territory there – I'd recommend you'd not use your PC time as an indicator of when flow graph operation started.Instead, you should count how many items your source has already produced, and divide that number by the sampling rate. This is one of the very rare cases where the "function probe" has a sensible use: asynchronous update of a GUI with non-sample data. What I did here is used "Null Source" instead of your USRP source, and gave it the id "source_block_id". I used that ID in the "function probe"'s "Block ID" field. I'm calling the block's "nitems_written" method (argument 0 means "first output stream") which gives the number of items produced by the block. In the QT GUI Label, I'm using the ID of the Function Probe (here: "fprobe_val"), and divide that by the sampling rate. Done! Best regards, Marcus On 09/27/2017 11:52 PM, Ali wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |