On Sat, May 31, 2014 at 11:03 PM, Pengyu Zhang <zhange...@gmail.com> wrote:

> Hi Activecat,
>
> Thanks for your detailed examples. I will try set_output_multiple() and
> tell you my user experiences :)
>
> I still have a question which was posted at the beginning of my previous
> email. How to configure the "Sample Rate" (which is samp_rate) as one of
> the variables of my custom block? For blocks provided by GRC, you can click
> the GUI block and see an option of setting the sample rate. For customized
> block, how to integrate this variable in the c++ code? Is there an example
> that I can follow? Thanks.
>
> Pengyu
>


I've created a sample for you at https://github.com/activecat/gr-test1
You could run the flowgraph found in the "examples" directory.
Try to change the samp_rate of the flowgraph from 32kHz to different values
(64kHz, 200kHrz etc).
You will observe via the GUI Scope Sink, that the block consistently
produces two 1ms pulse for every 10ms.
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to